dinerojs / dinero.js

Create, calculate, and format money in JavaScript and TypeScript.
https://v2.dinerojs.com/docs
MIT License
6.28k stars 188 forks source link

[Question]: What's the status with v2? Are you looking for help? #764

Open macdonaldr93 opened 8 months ago

macdonaldr93 commented 8 months ago

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:

  1. I'm doing calculations on large sums and multiple by percentages, I want to make sure I was bigints.
  2. 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.
  3. 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.

MikaelCarpenter commented 6 months ago

Fwiw, I'm also happy to help out if needed 👍

pierre-H commented 5 months ago

Hi @sarahdayan !

Thank you for your great work ! As DineroJS is a such important library, what is your answer for @macdonaldr93 ?

Thank you !

ScreamZ commented 5 months ago

As a safe alternative in the meantime, if you're not happy with v1 or v2 : https://github.com/MikeMcl/decimal.js

palfaro91 commented 5 months ago

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.

viktorbasta commented 4 months ago

I think this lib is dead tbh 💀

CanRau commented 3 months ago

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 😅

ScreamZ commented 3 months ago

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 :)

CanRau commented 3 months ago

That's true tho there's lots of unanswered issues and prs

kibertoad commented 2 months ago

@sarahdayan Are you open to getting additional maintainers?