Simple and Useful Number Utility
npm install @kevingio/number-utils
yarn add @kevingio/number-utils
Here are the functions that available in this package
Utility | Description |
---|---|
toIDR | format a string or number with Rp prefix and thousand separator |
removeNonNumber | remove non number characters from string |
getRandomNumber | get random string character with specified length |
thousandSeparator | return a string or number with thousand separator |
You can refer to this for the usage
import toIDR from '@kevingio/number-utils/dist/helpers/toIDR';
removeNonNumber toIDR from '@kevingio/number-utils/dist/helpers/removeNonNumber';
getRandomNumber toIDR from '@kevingio/number-utils/dist/helpers/getRandomNumber';
thousandSeparator toIDR from '@kevingio/number-utils/dist/helpers/thousandSeparator';