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
-
.TimeToMilliseconds(time) ⇒
number
-
.MillisecondsToTime(ms) ⇒
string
Timecode.MillisecondsToTime(ms) ⇒ Converts millisecond to standard time code
Kind: static method of Timecode
Returns: string
- Converted Timecode Eg. 2:55:55
Param | Description |
---|---|
ms | Milliseconds in number |
Example
const time = Timecode.MillisecondsToTime(32000000)
number
Timecode.TimeToMilliseconds(time) ⇒ Converts a standard time code to milliseconds.
Kind: static method of Timecode
Returns: number
- Milliseconds
Param | Description |
---|---|
time | The 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.