Utils for formatting numbers, strings and money.
npm install @exodus/formattingUtils for formatting numbers, strings, and money.
``bash`
yarn add @exodus/formatting
See the test files for usage examples:
- Numbers - roundDecimalSignificantsUp, padDecimals, asOrdinal. To round, pad, and format numberstoCamelCase
- Strings - , toKebapCase, toPascalCase, truncate, pad, etc. To transform and manipulate stringsformatBytes
- Bytes - . To format byte sizes into human-readable formatformatCurrency
- Currency - . To format currency values with locale supportformatNumber
- Currency Utils - , getCurrencySymbol. To get currency symbols and format numbersformatAssetAmount
- Asset - , formatBalance, isDustAmount. high level wrappers to format crypto asset-related numbers with pre-defined rulesformatPrice
- Price - , formatPriceUSD, formatAssetPrice. high level wrapper to format fiat prices with pre-defined rulesformatPercentage`. To format percentage values with optional plus signs
- Percentage -
MIT