An immutable JS library for working with monetary values 💰⚒

Dinero.js makes it easy to create, calculate and format monetary values in JavaScript. You can perform arithmetic operations, extensively parse and format them, check for a number of things to make your own development process easier and safer.

Around the web




You need to become a Contributor to join the discussion - Find out how.
Idris MokhtarzadaHiring@idris_mokhtarzada
I like this idea a lot, and will probably use it! A few suggestions: 1) Expose a `Dinero` global on your docs page, so we can play around with it in the console. Other libraries do this and I love it. 2) Add something about file size (minified) to your docs page. I dug around a bit and it looks like it's around 4.4KB minified. 3) Would be nice to have types (TypeScript or Flow). If we end up using this, I will likely create and add Flow types to the `flow-typed` repository.
Idris MokhtarzadaHiring@idris_mokhtarzada
Another bit of caution: Watch out for currencies with more than 2 decimal places, like Bitcoin.
Sarah DayanMaker@frontstuff_io · Front-End Developer (CSS, JavaScript).
@idris_mokhtarzada You can specify the number of decimal places in v1.3.0 🎉 https://github.com/sarahdayan/di...
Opeyemi Obembe@kehers · Maker: thefeed.press
Took me a while to find a link to the [Github] source.
Sarah DayanMaker@frontstuff_io · Front-End Developer (CSS, JavaScript).
@kehers It's on the PH page, but I've added a ribbon on the docs page now 👍
Blanka Mayer@blankamayer · Design
I would like to use your product.
Kristian FreemanPro@imkmf · Building @producthunt & @byteconf
> immutable and chainable API 💪
Investment Superhero@mkovacev · Tech/Finance Geek. Share w/Me Cool Stuff
Can you build a library for other cryptos as well:)? I like this very much.
Sarah DayanMaker@frontstuff_io · Front-End Developer (CSS, JavaScript).
@mkovacev I would first need to link into the specifics of cryptocurrencies but that's an idea 🙂 Would probably make it a plugin for Dinero.