Use Case Suggestion: thousandSeperator
See original GitHub issuefunction thousandSeperator: Seperate thousands using commas
const thousandSeperator = (num) => {
let parts = num.toString().split(".");
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return parts.join(".");
}
console.log(thousandSeperator(130000));
//=> 130,000
Reference: https://goo.gl/jKeiy8
Thanks @jadjoubran 😊
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Show thousands separator when we input value
I wanna have a request for Appsheet. That shows thousands separators when we input. In the picture below, it's very hard for me...
Read more >Format number with thousands separator in Flow email
Here's an expression to format a float less than 1 million into a string for currency (not including the dollar symbol) with a...
Read more >Solved: Bringing in thousand separator - Designer
Solved: Hi Am trying to bring in thousand separator using below, not sure what is wrong, have experimented with a few different data...
Read more >Thousand separator using COUNT values
I have two tables: One displaying the SUM of values, the other the count of values. I can only manage to show thousand...
Read more >How to apply thousand separator in Flatfile targets.
Hi, Any thoughts/workarounds to apply a thousand separators in flat file targets. For ex: if the src number comes like 1000000.000 it should ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yes indeed, the problem is if you take a look at this example:
you can immediately understand what the function does but reading what’s happening inside the function takes a lot more time
And awesome thanks 😄
Not necessarily one liner solutions, for example How to fetch json in JavaScript and other use cases are more than one line, however they’re tackling a single use case, rather than a ready made function.
The reason why I’m avoiding functions is because 30-seconds-of-code has most of these covered