js-big-decimal
dinero.js
js-big-decimal | dinero.js | |
---|---|---|
2 | 2 | |
134 | 6,206 | |
- | 0.5% | |
5.9 | 0.0 | |
27 days ago | 5 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
js-big-decimal
-
Numeric from DB to string.
So yeah, there's no zero effort drop-in replacement. If you really really need all that precision (which I doubt), I'd recommend using something like js-big-decimal to handle the heavy lifting.
-
Algebra in Javascript
(Consider using https://github.com/royNiladri/js-big-decimal if you care about accuracy. JavaScript isn’t great at some floating point calculations https://modernweb.com/what-every-javascript-developer-should-know-about-floating-points/ )
dinero.js
-
[AskJS] How do you deal with floats in production apps?
See for example https://github.com/dinerojs/dinero.js/issues/6 (floating point issues because dinero used vanilla floats…)
-
[TypeScript][PostgreSQL][TSyringe][Express]Try TypeORM 2
There are some libraries for handling monetary types like Dinero.js. But they are only for using in JavaScript|TypeScript world.
What are some alternatives?
Angular - Deliver web apps with confidence 🚀
cashify - 💸 Lightweight currency conversion library, successor of money.js
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
optics-ts - Type-safe, ergonomic, polymorphic optics for TypeScript
ts-8-bit - Using TypeScript's Type System to do 8-bit Arithmetic
Mida - A JavaScript framework to easily operate in global financial markets.
mintable - 🍃 Automate your personal finances – for free, with no ads, and no data collection.
eslint-plugin-big-number-rules - Enforce (or automatically fix) finance-safe calculations using BigNumber or similar libraries.
Basenumber.js - A BigDecimal library for arbitrary precision that allows you to work with numbers in different bases from 2 to 36.
rimbu - Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
money.ts - A TypeScript/JavaScript library to make working with monetary values easier and safer.