Skip to content

Conversation

@gabrielflorit
Copy link

This PR supports decimals, but it doesn't throw an error on non-numeric strings.

@jtara1
Copy link

jtara1 commented May 4, 2021

@cappslock thoughts on the PR?

@cappslock
Copy link
Owner

Hi, I'm not really maintaining this repository as this is now a standard feature in JavaScript. If you need this functionality, let me suggest:

new Intl.NumberFormat('en-US').format(123456.789)
// 123,456.789

@jtara1
Copy link

jtara1 commented May 6, 2021

Node.js 12.11+ currently supports this and Node.js 10 is no longer LTS since last Friday so the timing works out. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants