ms-utility
TypeScript icon, indicating that this package has built-in type declarations

3.3.0 • Public • Published

Yet another update...

import { Parser } from "ms-utility"

const parser = new Parser([
    [
        "d",
        {
            letter: 'd',
            word: 'day',
            ms: 86_400_000
        }
    ]
]) // This adds new time units to the parser.

console.log(
    parser.parseToString(86_400_000), // Will return 1 day.
    parser.parseToMS('1d') // Will return 86_400_000.
)

Readme

Keywords

none

Package Sidebar

Install

npm i ms-utility

Weekly Downloads

33

Version

3.3.0

License

ISC

Unpacked Size

42.4 kB

Total Files

32

Last publish

Collaborators

  • ruben40000