Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const formatBigIntNum = (value) => {
- if (isNaN(value)) return value
- const isInteger = Math.floor(value) === value
- return isInteger ?
- String(value).replace(/(?=(\B\d{3})+$)/g, ',') :
- value
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement