sec
Convert a time string to seconds:
'00:22:17'
→1337
Install
$ npm install sec
Usage
import toSeconds from 'sec';
// hours:minutes:seconds
toSeconds('00:22:17');
//=> 1337
toSeconds('22:17');
//=> 1337
toSeconds('17');
//=> 17
Convert a time string to seconds:
'00:22:17'
→1337
$ npm install sec
import toSeconds from 'sec';
// hours:minutes:seconds
toSeconds('00:22:17');
//=> 1337
toSeconds('22:17');
//=> 1337
toSeconds('17');
//=> 17
npm i sec
25,040
2.0.0
MIT
2.31 kB
4