globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 605 forks source link

Extend number format to use string instead of number #935

Open xgenvn opened 1 year ago

xgenvn commented 1 year ago

Due to the limitation of the javascript number format. Even with Intl API we still couldn't format a very large number, eg: feature: "integers out of (1e21, 1e-7)" Can I extend or add a plugin to use decimal.js (or an alternative) as a numeric wrapper?

rxaviers commented 1 year ago

A plugin using BigInt (or its polyfil) would be welcome. Thanks!

PS: Either a plugin or a change that has little impact on footprint.

xgenvn commented 1 year ago

@rxaviers Thanks for the response. Is there any plan for keeping the project alive so far, at least moving away from bower and grunt which are not considered mainstream anymore? I'm asking if the work for the external number formatting library can be put into the new version instead.

rxaviers commented 1 year ago

A library modernization is definitely welcome too. Thank you!

pau1tuck commented 8 months ago

Is this still of interest @rxaviers? I use this excellent library very frequently for my work. I'd be happy to contribute to its modernization.