track-duration
TypeScript icon, indicating that this package has built-in type declarations

0.2.7 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.7
    1
    • latest

Version History

Package Sidebar

Install

npm i track-duration

Weekly Downloads

1

Version

0.2.7

License

MIT

Unpacked Size

6.67 kB

Total Files

6

Last publish

Collaborators

  • believer