@exodus/formatting
v9.3.0
Published
Utils for formatting numbers, strings and money.
Readme
@exodus/formatting
Utils for formatting numbers, strings, and money.
Installation
yarn add @exodus/formattingUsage
See the test files for usage examples:
- Numbers -
roundDecimalSignificantsUp,padDecimals,asOrdinal. To round, pad, and format numbers - Strings -
toCamelCase,toKebapCase,toPascalCase,truncate,pad, etc. To transform and manipulate strings - Bytes -
formatBytes. To format byte sizes into human-readable format - Currency -
formatCurrency. To format currency values with locale support - Currency Utils -
formatNumber,getCurrencySymbol. To get currency symbols and format numbers - Asset -
formatAssetAmount,formatBalance,isDustAmount. high level wrappers to format crypto asset-related numbers with pre-defined rules - Price -
formatPrice,formatPriceUSD,formatAssetPrice. high level wrapper to format fiat prices with pre-defined rules - Percentage -
formatPercentage. To format percentage values with optional plus signs
License
MIT
