Utilities to convert data into human readable strings.
$ npm install @ayame/humanize
TypeScript typings included.
const humanize = require("@ayame/humanize");
humanize.duration(1000); // => 1s
humanize.bytes(3000); // => 2.93 KB
humanize.oridinal(3); // => 3rd
humanize.join(["you", "me", "them"]); // => you, me and them
- Added
join
function
- Added
ordinal
function.
- Initial release.