Bakhtina Sofya b84cb877be 1st comm | 2 hete | |
---|---|---|
.. | ||
index.js | 2 hete | |
license | 2 hete | |
package.json | 2 hete | |
readme.md | 2 hete |
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