Skip to content

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

@macdonaldr93

Description

@macdonaldr93

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions