/
githubmirror
/
tailwindcss
Обзор
Документация
Войти
/
githubmirror
/
tailwindcss
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/@tailwindcss-cli/src/utils/format-ns.ts
23 строки
434 B
Robin Malfait
Move the CLI to its own package `@tailwindcss/cli` (#13095)
06 мар 2024, 13:41
Не верифицирован
06 мар 2024, 13:41
0597489
Код
Авторство
О чём код?
export function formatNanoseconds(input: bigint | number) { let ns = typeof input === 'number' ? BigInt(input) : input if (ns < 1_000n) return `${ns}ns` ns /= 1_000n if (ns < 1_000n) return `${ns}µs` ns /= 1_000n if (ns < 1_000n) return `${ns}ms` ns /= 1_000n if (ns < 60n) return `${ns}s` ns /= 60n if (ns < 60n) return `${ns}m` ns /= 60n if (ns < 24n) return `${ns}h` ns /= 24n return `${ns}d` }