timeparse
v1.0.0
Published
Time parse utility
Downloads
111
Readme
Time Parse
Time parse utility
Install
Using npm
npm install timeparse
Usage
var timeparse = require('timeparse');
var result = timeparse('2m2s'); // 122000 (2 minutes and 2 seconds in milliseconds)
var result2 = timeparse('3m43s', 's') //223 (3 minutes, 43 seconds in seconds)
var result3 = timeparse('46.30ms', 'μs') //46300
Units
- w: weeks
- d: days
- h: hours
- m: minutes
- s: seconds
- ms: milliseconds
- μs: microseconds
License
MIT