dinerojs/dinero.js

Create, calculate, and format money in JavaScript and TypeScript

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 18 minutes ago
Added to GitGenius on September 9th, 2026
Created on March 10th, 2018
Open Issues & Pull Requests: 30 (+0)
GitHub issues: Enabled
Number of forks: 204
Total Stargazers: 6,793 (+0)
Total Subscribers: 30 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

Dinero.js is a JavaScript and TypeScript library for creating, calculating, and formatting money safely.

The core problem it solves is that language primitives alone cannot properly represent monetary values. Dinero.js provides a dedicated abstraction for money that treats amounts as immutable objects, ensuring that every operation returns a new instance with no side effects. This immutability model prevents accidental mutations and makes reasoning about monetary state easier. The library supports multiple precision modes, defaulting to JavaScript numbers but allowing bigint for handling large amounts, and can represent non-decimal currencies with any base or multi-subdivision structure.

Developers should choose this tool when building applications that require reliable money handling without the pitfalls of floating-point arithmetic. It suits projects ranging from e-commerce platforms to financial applications where correctness is critical. The library is framework-agnostic and works in any JavaScript environment. Its tree-shakeable design means you import only the functions you need, keeping bundle sizes minimal. The first-class TypeScript support with full type inference makes it particularly valuable in typed codebases.

The project maintains active continuous integration with automated testing. Development follows a structured approach with comprehensive documentation covering quick starts, core concepts, guides for specific use cases, and a complete API reference. The maintainers provide agent skills to help AI coding assistants understand best practices and correct usage patterns for the library.