Skip to content

danm/convert-iso8601-duration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Convert YouTube like duration strings to seconds

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published