# Dinero.js: 7.2 out of 10

A strong pick. 3rd of 8 in [Numbers and money](https://elestia.ai/opensource/numbers/index.md).

Dinero.js is a money library for JavaScript and TypeScript. It stores amounts as integers in minor units with a currency, and it reached a stable v2 (a full TypeScript rewrite with standalone functions) in March 2026. Of the maintained libraries built for money rather than for general decimal math, it is the best designed. It still rests mostly on one maintainer and has little independent validation.

**Best for:** TypeScript teams that build billing, checkout or accounting features and want currency-safe money values and lossless allocation, not raw decimal math.

## Scores

- **Overall: 7.2** (likely 6.1 to 8.3)
  - Claude Opus 5.5 (7.0): For money logic in TypeScript, it is the clearest choice among the peers. currency.js is unmaintained, and decimal.js, big.js and bignumber.js give no currency model or allocation. It is held back by one main maintainer, thin independent validation, a v2 that is only months old, and reach that is not growing faster than the market. Use decimal.js or bignumber.js when you need general decimal math instead.
  - GPT-6.2 Sol (7.3): Dinero.js is a stronger choice than currency.js for projects that need typed currencies and BigInt. Decimal.js is a better fit for general decimal arithmetic. For new money code, the BigInt entry point makes Dinero.js a strong pick, with the default backend’s allocation bug and the gap since the last release limiting the recommendation.
- **Needed by many: 4.4** (likely 3.4 to 5.5)
  - Claude Opus 5.5 (4.5): Only projects that handle money need it, such as e-commerce, billing and fintech. That is a clear but sizeable subset of the category. It does no general decimal math or number formatting, which most other peers cover.
  - GPT-6.2 Sol (4.3): Checkout, billing, and finance apps benefit from amounts that carry their currency and scale. Dinero.js works across frameworks, while general decimal arithmetic and display-only formatting call for different tools. The share of JavaScript projects that need this money model is hard to measure.
- **Helps a lot: 7.5** (likely 6.5 to 8.6)
  - Claude Opus 5.5 (7.5): v2 has a careful design: immutable values, structured currencies, compile-time currency safety, lossless allocate, and BigInt or custom calculators. Its stricter model (minor units, scaled multipliers, no divide) has a learning curve. Open issues report edge cases in allocate and toDecimal, and docs examples that the code does not support.
  - GPT-6.2 Sol (7.5): Version 2.0.2 offers typed currencies, automatic scale tracking, and several rounding modes. Ducat’s comparison found a small bundle and stronger correctness results with BigInt, though some operations were slower in its benchmarks. An independent audit reproduced silent misallocation in the default backend. Version-specific guidance is available for coding agents, but reported mistakes in the rounding examples make copied code less reliable.
- **Holds up over time: 6.5** (likely 5.1 to 7.7)
  - Claude Opus 5.5 (6.5): The repository is active, with 207 commits and 6 releases last year. v2 finally became stable after years in alpha, and releases now run through CI. It depends heavily on one maintainer who works on it unpaid, beside a full-time job. Only 4 issues are open, but 33 pull requests are waiting.
  - GPT-6.2 Sol (6.5): The repository recorded 207 commits in the past year, and the March v2 launch was followed by two quick fixes. The npm release cadence then slowed, and the allocation fix was still open in November. The v1 migration is substantial, and the public record shows one lead maintainer with limited visibility into backup release access or funding.
- **Used widely: 4.3** (likely 3.1 to 5.4)
  - Claude Opus 5.5 (5.0): About 3.9M downloads in 4 weeks, up 3.7x in a year. That is just below the 4.1x median, so it is not quite gaining ground. It has 408 dependent repositories, fewer than currency.js (707) and far fewer than the general decimal libraries. Part of the downloads still comes from v1 installs in older projects.
  - GPT-6.2 Sol (3.5): Four-week npm installs rose from 1.05 million to 3.88 million, or 3.71×, below the catalog’s 4.1× median. The package grew faster than currency.js, which still has more tracked dependent repositories. With 408 repositories and 65 packages tracked, plus two Bluesky posts, direct reach looks modest and remains hard to estimate from installs across both major versions.
- **Vouched for: 5.1** (likely 3.7 to 6.4)
  - Claude Opus 5.5 (4.0): It is often recommended in independent money-handling articles and comparison sites, and it has 6.8k stars. I found no named production users, survey data or independent benchmarks, and there are no Hacker News stories. Most endorsements predate v2.
  - GPT-6.2 Sol (6.1): WooCommerce ships its Blocks package with a v2 dependency, and Cypress uses v2 in its example payment app. External testing found that BigInt handled more cases correctly than the number backend. Current developer satisfaction data and further confirmed production use are sparse.
- **Safe: 7.3** (likely 6.2 to 8.4)
  - Claude Opus 5.5 (7.5): It has no advisories ever, zero dependencies and an MIT licence. Releases are published from GitHub Actions. The Scorecard is weak at 4, with 0 on code review, token permissions, security policy and SAST. Maintained also scores 0, although the repository is active.
  - GPT-6.2 Sol (7.1): Dinero.js has an MIT licence, zero runtime dependencies, and no recorded OSV advisories. GitHub Actions gates releases on tests, and the release job is configured for identity-based publishing. The 4/10 Scorecard flags weak code-review, token-permission, and action-pinning checks. The repository has no published security policy, and the number of people with publish access could not be verified.

## Good

- Typed currencies make mixing currencies in add or subtract a compile-time error.
- allocate splits amounts by ratios without losing cents, and BigInt and custom calculators handle very large amounts.
- Zero runtime dependencies, MIT licence, tree-shakeable functions and types shipped in the package.
- Releases come from a CI pipeline, and the project ships agent skills that teach coding agents to use v2 correctly.

## Bad

- v2 broke most of the v1 API: divide, percentage and toFormat are gone, and v1 tutorials and AI-generated code often no longer apply.
- Integer minor units and scaled multipliers take more thought than currency.js's float-friendly API.
- Formatting is left to Intl.NumberFormat, so it does not replace a number-formatting library.
- Development rests mostly on one maintainer, and 33 pull requests are open.

## The numbers

- Downloads, 4 weeks: 3.9M
- In a year: ×3.7
- GitHub stars: 6.8k
- Commits, 12 months: 207
- Last npm release: Mar 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/dinerojs/dinero.js
- npm: https://www.npmjs.com/package/dinero.js

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
