eslint-plugin-big-number-rules
dinero.js
Our great sponsors
eslint-plugin-big-number-rules | dinero.js | |
---|---|---|
4 | 2 | |
12 | 6,192 | |
- | 0.5% | |
3.0 | 0.0 | |
5 days ago | 3 days ago | |
JavaScript | 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.
eslint-plugin-big-number-rules
-
eslint-plugin-big-number-rules: Enforce finance-safe calculations (helps 0.1 + 0.2 really equal 0.3)
And they did bite me, so I wrote this eslint plugin to help out a FinTech app that was experiencing a number of such bugs.
-
Speeding up the JavaScript ecosystem - one library at a time
Either avoid floating-point, perhaps using BigInt, or use a library like BigNumber.js. (Incidentally, I wrote an eslint plugin to enforce its use.)
-
[AskJS] How do you deal with floats in production apps?
I wrote an eslint plugin for it.
-
Become the master of your eslint with no-restricted-syntax
For example, say you want to avoid using native arithmetic in your finance calculations to avoid the infamous binary-floating-point problems. There's no way to get standard.js to warn you about that. But (warning: self promotion) an eslint plugin can be written to do that for you. :)
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?
eslint-plugin-simple-import-sort - Easy autofixable import sorting.
cashify - 💸 Lightweight currency conversion library, successor of money.js
bignumber.js - A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic
optics-ts - Type-safe, ergonomic, polymorphic optics for TypeScript
elephize - Typescript to PHP translation tool
Mida - A JavaScript framework to easily operate in global financial markets.
proposal-decimal - Built-in decimal datatype in JavaScript
rimbu - Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
kphp - KPHP — a PHP compiler
break_eternity.js - A Javascript numerical library to represent numbers as large as 10^^1e308 and as small as 10^-10^^1e308. Sequel to break_infinity.js, designed for incremental games.
decimal.js - An arbitrary-precision Decimal type for JavaScript