Neo Zero
ms
PoolZero-dependency time conversion library - Modern, tree-shakeable alternative to ms package
$ lpm install @lpm.dev/neo.ms
26 exportsTypeScript
dist
Functions
ms
function ms(value: string): number | undefined
| Parameter | Type | Description |
|---|---|---|
value | string |
ms
function ms(value: number, options?: FormatOptions): string
| Parameter | Type | Description |
|---|---|---|
value | number | |
optionsoptional | FormatOptions |
parse
function parse(str: string): number | undefined
| Parameter | Type | Description |
|---|---|---|
str | string |
formatShort
function formatShort(ms: number): string
| Parameter | Type | Description |
|---|---|---|
ms | number |
formatLong
function formatLong(ms: number): string
| Parameter | Type | Description |
|---|---|---|
ms | number |
format
function format(ms: number, options?: FormatOptions): string
| Parameter | Type | Description |
|---|---|---|
ms | number | |
optionsoptional | FormatOptions |
Variables
MILLISECOND
unknownSECOND
numberMINUTE
numberHOUR
numberDAY
numberWEEK
numberYEAR
numberdist
Functions
ms
function ms(value: string): number | undefined
| Parameter | Type | Description |
|---|---|---|
value | string |
ms
function ms(value: number, options?: FormatOptions): string
| Parameter | Type | Description |
|---|---|---|
value | number | |
optionsoptional | FormatOptions |
parse
function parse(str: string): number | undefined
| Parameter | Type | Description |
|---|---|---|
str | string |
formatShort
function formatShort(ms: number): string
| Parameter | Type | Description |
|---|---|---|
ms | number |
formatLong
function formatLong(ms: number): string
| Parameter | Type | Description |
|---|---|---|
ms | number |
format
function format(ms: number, options?: FormatOptions): string
| Parameter | Type | Description |
|---|---|---|
ms | number | |
optionsoptional | FormatOptions |
Variables
MILLISECOND
unknownSECOND
numberMINUTE
numberHOUR
numberDAY
numberWEEK
numberYEAR
numberUnlimited AccessInstall as many Pool packages as you need.
Fund Real WorkEvery install you run sends revenue directly to the developer who built it.
Taxes calculated at checkout based on your location.
Insights
97/100Excellent
Weekly Installs
3Version
1.0.0Published
LicenseMIT
Size62.89 KB
Files14
Node version>= 18
TypeScriptYes