@toolsnap/number-format
v1.0.0
Published
Number formatting utilities - thousands separator, currency, percentage
Maintainers
Readme
@toolsnap/number-format
Number formatting utilities.
Installation
npm install @toolsnap/number-formatUsage
const {currency, percent, thousands, bytes, compact, ordinal} = require('@toolsnap/number-format');
currency(1234.5) // '$1,234.50'
percent(0.856) // '85.6%'
thousands(1000000) // '1,000,000'
bytes(1536) // '1.5 KB'
compact(2500000) // '2.5M'
ordinal(1) // '1st'🔗 More tools at risetop.top
License
MIT
