convert-iso8601-duration
v3.0.0
Published
Convert YouTube like duration strings to seconds
Downloads
188
Readme
convert-iso8601-duration
Convert YouTube like duration strings to seconds
Install
npm i -S convert-iso8601-duration
Example
const isoConvert = require('convert-iso8601-duration');
const seconds = isoConvert('PT1M37S')
console.log('seconds', seconds); // 'seconds', 97
console.log('ms', (seconds * 1000)); // 97000
Test
npm test
Build
npm run build