0.1.2 • Published 3 years ago

simple-timecode v0.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

simple-timecode

A simple tool to convert timecodes

What do you expect?

Timecode

Class to handle static function

Kind: global class

Timecode.MillisecondsToTime(ms) ⇒ string

Converts millisecond to standard time code

Kind: static method of Timecode
Returns: string - Converted Timecode Eg. 2:55:55

ParamDescription
msMilliseconds in number

Example

const time = Timecode.MillisecondsToTime(32000000)

Timecode.TimeToMilliseconds(time) ⇒ number

Converts a standard time code to milliseconds.

Kind: static method of Timecode
Returns: number - Milliseconds

ParamDescription
timeThe time code. Eg. 2:55:55

Example

const ms = Timecode.TimeToMilliseconds("4:30:00");

Tests

Tests are written in tape

To run them, just do:

npm run test

Contributing

Any is welcomed. Just open a PR.