strtoms
Convert string to milliseconds
Install
$ npm i strtoms
Usage
const strtoms = require("strtoms");
strtoms("1ms"); // 1
strtoms("12s"); // 12000
strtoms("1h"); // 3600000
strtoms("1d"); // 86400000
Convert string to milliseconds
$ npm i strtoms
const strtoms = require("strtoms");
strtoms("1ms"); // 1
strtoms("12s"); // 12000
strtoms("1h"); // 3600000
strtoms("1d"); // 86400000
npm i strtoms
0
0.0.3
MIT
2.75 kB
6