0.2.0 • Published 8 months ago
@byndyusoft-ui/formatted-number v0.2.0
@byndyusoft-ui/formatted-number
Render your number with dividing digits and inserting thin space. You can use all power of
Intl.NumberFormat()utility. For example, you can render numbers as money values. Or you can calculate maximum number of decimal places of your numbers' array by usinggetMaxFractionalPartOfNumbers()function and set fraction digits count of number byminimumFractionDigitsoption. Also, you can customizeformatterandparseNumberToPartsfunctions, and divider symbol between number's parts bynumberPartsDividerClassNameproperty.
Installation
npm i @byndyusoft-ui/formatted-number
# or
yarn add @byndyusoft-ui/formatted-number