pjbatista / decimal.js-i18n

Full internationalization support for decimal.js.
MIT License
6 stars 0 forks source link

Provide a Version Only Exporting Format Helpers #1

Open 0xcaff opened 2 years ago

0xcaff commented 2 years ago

Importing and mutating decimal.js seems like it could cause conflicts with other modules. It seems like this is necessary for some reason according to this comment, but why is unclear to me.

https://github.com/pjbatista/decimal.js-i18n/blob/c9c4b7bb96c97a9f22866eb7ceb319ac4fc1e18c/src/index.ts#L47

Could we instead have a version of this library which does no automatic patching but instead exports the Decimal.Format object?

Happy to make a PR once we've decided! Thanks so much for making this library!!

pjbatista commented 2 years ago

Sorry about the delay! I was working exactly on that before my burnout haha

If that PR is still possible I'm very much looking forward to it. Otherwise, I'll start working on that again.