mshumanize
v1.0.1
Published
Convert ms to human readable format with customization.
Downloads
3
Readme
mshumanize
Convert ms to human readable format with customization.
const mshumanize = require('mshumanize');
mshumanize(10000) // 0 day, 0 hour, 0 minutes, 10 seconds
mshumanize(128332983) // 1 day, 11 hour, 38 minutes, 52 seconds
mshumanize(102273, { separator: "|" }) // 0 day|0 hour|1 minutes|42 seconds
mshumanize(188372, { day: "d", hour: "h", minutes: "m", seconds: "s" }) // 0d, 0h, 3m, 8s