0.3.1 • Published 10 years ago

format-seconds v0.3.1

Weekly downloads
328
License
MIT
Repository
github
Last release
10 years ago

format-seconds

npm.io npm.io npm.io npm.io

Format duration in seconds to readable string.

A partial implementation (104 ~ 10-24) of https://en.wikipedia.org/wiki/Ordersof_magnitude(time)

Examples

DEMO

Test cases

inputexpected
242366.73 h
1000010000.00 s
10001000.00 s
1.2441.24 s
0.00232.30 ms
0.00000232.30 µs
2.3e-92.30 ns
11.00 s

Installation

For Node.js:

npm install format-seconds

For Browsers:

Add a script tag which points to formatSeconds.min.js

Usage

formatSeconds(0.042); // 0.042ms

License

MIT

0.3.1

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago