Skip to content

This is a number formatting repo which is used for formating number according to user's requirements

Notifications You must be signed in to change notification settings

nikhilgarware/react-js-thousand-seperator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

If you figure out any issue please feel free to update it here

About

This is a number formatting repo which is used for formating number according to user's requirements

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published