npm.io
1.1.4 • Published 4 years ago

basic-ms

Licence
Apache-2.0
Version
1.1.4
Deps
0
Size
18 kB
Vulns
0
Weekly
0

Image Image

Image

News

- Fixed unknown time error.

Use

const { timeToMs, parseMs, msToTime } = require('basic-ms');

//Time To Ms
timeToMs('1h'); // 3600000

//Ms To Time
msToTime(3600000); // 1h

//parseMs
parseMs(3600000); // { years: 0, months: 0, weeks: 0, days: 0, hours: 1, minutes: 60, seconds: 3600, milliseconds: 0 }

Keywords