()
| 78 | } |
| 79 | |
| 80 | export function createOverflow() { |
| 81 | const [overflow, setOverflow] = createSignal(false) |
| 82 | return { |
| 83 | get status() { |
| 84 | return overflow() |
| 85 | }, |
| 86 | ref(el: HTMLElement) { |
| 87 | const sync = () => { |
| 88 | setOverflow(el.scrollHeight > el.clientHeight + 1) |
| 89 | } |
| 90 | |
| 91 | const obs = makeResizeObserver(sync) |
| 92 | obs.observe(el) |
| 93 | |
| 94 | sync() |
| 95 | }, |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | export function formatDuration(ms: number, locale: string): string { |
| 100 | const normalized = normalizeLocale(locale) |
no outgoing calls
no test coverage detected