ms
ms copied to clipboard
Add decimal place support
As per https://github.com/zeit/ms/issues/124
Here is the PR to add decimal place support. Default is 0
, max decimal place is 3
.
ms(60000, { decimal: 1 }) // "1m"
ms(66000, { decimal: 1 }) // "1.1m"
ms(-3 * 66000, { long: true, decimal: 1 }) // "-3.3 minutes"
ms(234234234, { decimal: 2 }) // "2.71m"
ms(ms('10.5 hours'), { long: true, decimal: 1 }) // "10.5 hours"
ping
@leerob @gmattie any chance for having this functionality added?