pretty-print-ms
v1.0.5
Published
Convert milliseconds to something easier on the eyes
Downloads
1,213
Maintainers
Readme
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