dinero.js
dinero.js copied to clipboard
[Question]: What's the status with v2? Are you looking for help?
Hey there! I'm trying to find a robust library to handle money in my applicaiton. dinero.js is by far the best one I've seen so far. I'm curious what the status is on V2? Are you looking for any additional help?
I'm more than happy to help. Writing another library to handle my specific use-case doesn't really make sense. I could fork dinero.js, but I don't like how JS community often ends up with multiple versions of the same library. I'd love for this to become the standard for Money.
Let me know!
Use case
I build Shopify Apps and I need a library to handle money. A few considerations for me:
- I'm doing calculations on large sums and multiple by percentages, I want to make sure I was bigints.
- I need a library where I can easily use strings for currency codes. Shopify's API returns an amount as a signed stringified decimal with arbitrary precision and a currency code as a string.
- I need to easily convert the money back to a decimal format to make API calls.
Dinero.js works great for 1. Although, I find passing around the generic a bit combursome. I'm wondering if there's an easier way to abstract that.
Dinero.js doesn't work great for 2. I want to import from the currencies library but all those currencies are using the number generic. They're incompatible once I've set the calculator to use bigint. It's a ton of work to rewrite all those currencies with bigints. Also, looking up the currency from the string to the object is a bit annoying. Not too bad, as I can write a helper. I'm just thinking this could be something nice for the library to handle and maybe provide a simpler interface.
Dinero.js works great for 3. I used the toDecimal
helper.
Fwiw, I'm also happy to help out if needed 👍
Hi @sarahdayan !
Thank you for your great work ! As DineroJS is a such important library, what is your answer for @macdonaldr93 ?
Thank you !
As a safe alternative in the meantime, if you're not happy with v1 or v2 : https://github.com/MikeMcl/decimal.js
Any update on the status of v2? I wanted to use it but held back due to it being in alpha stage and we need it for a production api.
I think this lib is dead tbh 💀
As a safe alternative in the meantime, if you're not happy with v1 or v2 : https://github.com/MikeMcl/decimal.js
looks interesting, thanks for sharing, tho seems also a little abandoned 😅
As a safe alternative in the meantime, if you're not happy with v1 or v2 : MikeMcl/decimal.js
looks interesting, thanks for sharing, tho seems also a little abandoned 😅
"Stable" libraries don't need maintenance, Maths aren't changing. Algorithms are :)
That's true tho there's lots of unanswered issues and prs
@sarahdayan Are you open to getting additional maintainers?