simple-timecode
v0.1.2
Published
What do you expect?
Downloads
2
Maintainers
Readme
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
Timecode.MillisecondsToTime(ms) ⇒ string
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)
Timecode.TimeToMilliseconds(time) ⇒ number
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.