Bakhtina Sofya b84cb877be 1st comm | il y a 3 semaines | |
---|---|---|
.. | ||
index.js | il y a 3 semaines | |
license | il y a 3 semaines | |
package.json | il y a 3 semaines | |
readme.md | il y a 3 semaines |
Convert a time string to seconds:
'00:22:17'
→1337
$ npm install --save sec
var sec = require('sec');
// hours:minutes:seconds
sec('00:22:17');
//=> 1337
sec('22:17');
//=> 1337
sec('17');
//=> 17
MIT © Sindre Sorhus