convert-iso8601-duration
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    21
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    21
  • 1.0.1
    1
  • 1.0.0
    2

Package Sidebar

Install

npm i convert-iso8601-duration

Weekly Downloads

14

Version

3.0.0

License

MIT

Unpacked Size

4.21 kB

Total Files

6

Last publish

Collaborators

  • danm