pretty-print-ms
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

pretty-print-ms

Convert milliseconds to something easier on the eyes.

import prettyPrint from 'pretty-print-ms';

prettyPrint(912); // Returns "912ms"
prettyPrint(5234); // Returns "5s"
prettyPrint(123075); // Returns "2m 3s"
prettyPrint(46238459); // Returns "12h 50m"

Installation

Install the package:

npm i pretty-print-ms

Dependents (3)

Package Sidebar

Install

npm i pretty-print-ms

Weekly Downloads

168

Version

1.0.5

License

ISC

Unpacked Size

6.53 kB

Total Files

14

Last publish

Collaborators

  • cocopina