Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

normalplaytime

1.0.6 • Public • Published

NormalPlayTime Parser

Parser for Normal Play Time (RFC 2326).

Installation

npm install normalplaytime

Example

var npt = require('normalplaytime');
 
var ms1 = npt.parse("1");   // return 1000
var ms2 = npt.parse("1.2"); // return 1200
 

More Specs: (output from npm test)

should return null for invalid strings
should return 1000 for "1"
should return 1234 for "1.234"
should return 754000 for "12:34"
should return 754560 for "12:34.56"
should return 62000 for "1:2"
should return 3723400 for "1:2:3.4"

Development

npm install
npm test

Keywords

install

npm i normalplaytime

Downloadsweekly downloads

33

version

1.0.6

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability