ms-utility
v3.3.0
Published
Yet another update... ```ts import { Parser } from "ms-utility"
Downloads
523
Readme
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.
)