Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate intcomma to Intl.NumberFormat #168

Open
rdmurphy opened this issue Apr 27, 2020 · 2 comments
Open

Migrate intcomma to Intl.NumberFormat #168

rdmurphy opened this issue Apr 27, 2020 · 2 comments

Comments

@rdmurphy
Copy link
Owner

I think it'd be good to rid this function of the regex that figures out where to place commas and migrate to the Intl.NumberFormat API.

This in theory would create a path for adding light localization to journalize without requiring a massive dependency.

@rdmurphy
Copy link
Owner Author

Not that extensive IE 11 compatibility has ever been a goal of this library but browser support is surprisingly good.

image

@rdmurphy
Copy link
Owner Author

rdmurphy commented Apr 28, 2020

Bummer — this may not be a valid option if we expect to support Node.js < v13, and may not be full-proof until Node v12 leaves LTS!

Node began releasing builds with full-icu support in v13, which means unless you explicitly did the same for any versions below that you won't get what you'd expect with Intl.NumberFormat. I use nodenv and the v10 and v12 builds I have on hand didn't come with full ICU support out of the box, so probably safe to assume most folks wouldn't either.

Not gonna lie didn't expect Node to be the blocker here. 🤔

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

No branches or pull requests

1 participant