@cjser/sec
v2.0.0-cjser.2
Published
Convert a time string to seconds: `'00:22:17'` → `1337`
Maintainers
Readme
sec
Convert a time string to seconds:
'00:22:17'→1337
Install
$ npm install secUsage
import toSeconds from 'sec';
// hours:minutes:seconds
toSeconds('00:22:17');
//=> 1337
toSeconds('22:17');
//=> 1337
toSeconds('17');
//=> 17cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/sec
