Humanizer
Humanizer a value. Humanizer
provides "ago" libraries-like capabilities and so on...
In fact, unlike other libraries, humanizer
can work with any type of unit at any scale.
Humanizer is tested against browsers and NodeJS.
npm install humanizer
var Humanizer = ; // Define the time unittime = 'ms' 1 // the base unit is 1 `ms` ; // time.humanize(value, [preferedUnit]);time; // [60, 'sec']time; // [20, 'hour']time; // [20, 'sec'] (feels more like a conversion to me though) // time.humanizeRange(value, start, end, [preferedUnit]);time);// -> [314, 'hour']// -> 314 'things' by `hour`