dinero.js
dinero.js copied to clipboard
Adding all Currencies to also have Currency<bigint>
Adding an additional 168-bigint
to the amendments
folder. that contain all currencies in Currency<bigint>
format.
I am not sure wether this is the right place or even way of doing it, but as they are currently missing, I thought providing one proposal on how to solve this might be a good idea.
Let me know your thoughts on this, happy to move the folder / or do something completely different :)
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/dinerojs/dinerojs/3HYVDrhLGRSPmYLT9TQLJ7HoFCV2
✅ Preview: https://dinerojs-git-fork-opencreek-currencies-bigint-dinerojs.vercel.app
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 03e3b1f6a422950869f6a024d589b6fc896c7b27:
Sandbox | Source |
---|---|
@dinero.js/example-cart-react | Configuration |
@dinero.js/example-cart-vue | Configuration |
dinerojs/dinero.js | Configuration |
@dinero.js/example-starter | Configuration |
Yes, creating two packages in the same fashion as the calculators seems like the right way to go.
I just created PR #665 it moves the currencies packages to currencies-number. If @sarahdayan thinks this is the way forward, @reckter could you modify this PR to create a new currencies-bigint package?
Also just a though, to avoid duplication, would making a script to generate the currency files be a better approach? All the data could be in a single json file.
@johnhooks Totally agree that we should generate the currencies. The currency
package could actually be repurposed into it, holding a single TypeScript or JSON file with the definitions. Users could reuse it to generate currency packages for custom amount data structure.
@johnhooks Looking at #670, it should be fairly trivial with that to implement this PR, so will look into that after it has been merged. (Feel free to just go ahead yourself, If I take to long 😅 ). Thanks for picking this up again 🍺 !
Sounds good!