dinero.js
Create, calculate, and format money in JavaScript and TypeScript
Dinero.js is a JavaScript and TypeScript library for creating, calculating, and formatting monetary values with precision and type safety. It provides immutable, side-effect-free functions for money manipulation including arithmetic operations, currency conversions, and localized formatting. The library includes dedicated agent skills that teach AI coding assistants like Claude Code, Cursor, and GitHub Copilot the correct usage patterns and common pitfalls when working with money in code. It's framework-agnostic, tree-shakeable, and supports both decimal and non-decimal currencies with configurable precision using number or bigint types.
Key Features
Use Cases
- 01Building e-commerce platforms that require accurate currency calculations and multi-currency support
- 02Developing financial applications where floating-point precision errors could cause monetary discrepancies
- 03Creating international applications that handle multiple currencies and locale-specific formatting
- 04Implementing subscription billing systems with recurring payment calculations
- 05Teaching AI coding agents how to properly handle money in JavaScript applications
- 06Building accounting or invoicing systems that require precise monetary arithmetic
Related Skills
View moresuperpowers
An agentic skills framework & software development methodology that works.
skills
Skills for Real Engineers. Straight from my .agents directory.
skills
Public repository for Agent Skills
ponytail
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
dinero.js — FAQ
What is Dinero.js?+
Dinero.js is a JavaScript and TypeScript library for safely creating, calculating, and formatting monetary values. It provides immutable functions for money manipulation and includes agent skills to teach AI assistants correct usage patterns.
How do I install Dinero.js?+
Install the library using npm with 'npm install dinero.js' or yarn with 'yarn add dinero.js'. For AI agent skills, run 'npx skills add dinerojs/skills' to teach your coding assistant best practices.
Which AI coding agents work with Dinero.js skills?+
The Dinero.js skills work with Claude Code, Cursor, GitHub Copilot, and other AI coding assistants that support the skills framework. The skills teach agents about best practices, common pitfalls, and correct usage patterns.
Do I need API keys to use Dinero.js?+
No, Dinero.js does not require any API keys or external services. It's a standalone JavaScript library that runs entirely in your application runtime.
Is Dinero.js free to use?+
Yes, Dinero.js is open source and released under the MIT license, making it free for both personal and commercial use.
Can Dinero.js handle large monetary amounts?+
Yes, Dinero.js supports pluggable precision, allowing you to use the default number type or bigint for handling very large monetary amounts without precision loss.
How do I install dinero.js?+
Open the source repository on GitHub and follow its README. dinero.js is a skill — MCP Agents Market links you directly to the official repo.
Is dinero.js free?+
dinero.js is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.