UnitFormat.js
JSON →UnitFormat.js is a lightweight, dependency-free number formatter that converts raw numbers to human-readable strings with metric suffixes like 10km, 5GB, 17kHz, 220MW. Current stable version is 1.1.5 with a slow release cadence. It supports base-10 and base-2 prefixes, custom unit strings, and configurable suffix lists. Differentiators include zero dependencies, TypeScript type definitions, and a single-function API that is easy to embed in browser or Node.js projects. Unlike similar libraries, it does not handle locale-specific formatting or significant figure rounding.
Resources
packageunitformat ↗