Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikhilgarware/react-js-thousand-seperator
This is a number formatting repo which is used for formating number according to user's requirements
https://github.com/nikhilgarware/react-js-thousand-seperator
formatter javascript number reactjs-thousand-seperator
Last synced: 18 days ago
JSON representation
This is a number formatting repo which is used for formating number according to user's requirements
- Host: GitHub
- URL: https://github.com/nikhilgarware/react-js-thousand-seperator
- Owner: nikhilgarware
- Created: 2021-10-06T11:19:02.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T11:12:39.000Z (over 1 year ago)
- Last Synced: 2024-10-31T19:59:19.439Z (20 days ago)
- Topics: formatter, javascript, number, reactjs-thousand-seperator
- Language: JavaScript
- Homepage:
- Size: 226 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-js-thousand-separator
## A package where you can format number in group of thousands and get desired unit of decimal values.
### Syntax
```
thousandSeperator(digits,decimal_allowed)
eg: thousandSeperator(50000.333,1)
// output: 50,000.3
```### Example:1
### In this example we are only converting number into decimal formatted number without decimal separation.
```
const number = 50000;
const output = thousandSeperator(number,0)
console.log(output) //50,000
```### Example:2
### In this example we are converting number into decimal formatted number with decimal separation.
```
const number = 50124.11111;
const output = thousandSeperator(number,2)
console.log(output) //50,124.11
```For more details please visit [here](https://medium.com/@noffybarudwale/javascript-format-numbers-with-commas-and-decimals-86b68ec5b180)
If you figure out any issue please feel free to update it [here](https://github.com/nikhilgarware/number-formatter/issues)