Skip to content

Converts milliseconds to a format like Spotify's track durations

License

Notifications You must be signed in to change notification settings

believer/track-duration

Repository files navigation

Track duration

npm version

Converts milliseconds to a format like Spotify's track durations.

Installation

npm install track-duration --save

Parse

parse(milliseconds: number): string

Takes milliseconds and returns a formatted duration.

Example

import { parse } from 'track-duration'

parse(5000000) // 1:23:19
parse(223452) // 3:43

Tests

npm run build # compile javascript code
npm test

About

Converts milliseconds to a format like Spotify's track durations

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published