Turning raw numbers, sizes, durations and dates into human-readable strings in the UI.
Overview
Bytes (1.5 KB), durations (1d 1h), relative time (3 hours ago), ordinals (21st), compact numbers (1.2M), pluralize, grammatical lists and truncation — one tiny typed package instead of installing five (pretty-bytes + ms + humanize-duration + …).
Install
$ npm install @lacspace/humanize
Quick example
@lacspace/humanizets
relativeTime(Date.now() - 3.6e6)
Returns "1 hour ago"
Tips
One package replaces pretty-bytes + ms + humanize-duration + ordinal + pluralize.
Zero-dependency and isomorphic — safe to import on the server, in the browser, on the edge and in React Native. It tree-shakes, so you only ship what you import.
Looking for the complete API and more examples? The npm page and GitHub README carry the full reference — or grab the PDF.