1 dépôt
Performing safe, precise arithmetic on monetary values without floating-point errors, including addition, subtraction, and proportional allocation.
Distinct from Monetary: Distinct from Monetary: focuses on the arithmetic operations themselves rather than the value object pattern.
Explore 1 awesome GitHub repository matching software engineering & architecture · Safe Arithmetic Operations. Refine with filters or upvote what's useful.
Dinero.js is a TypeScript-first library for creating, calculating, and formatting monetary values. It provides immutable money objects that represent amounts in the smallest currency subdivision as integers, ensuring precision and preventing floating-point errors. The library enforces same-currency rules on arithmetic operations and validates currency codes against ISO 4217 definitions at creation time. The library distinguishes itself through a calculator plugin architecture that delegates arithmetic operations to interchangeable backends, supporting number, bigint, or custom precision libra
Performs immutable arithmetic on monetary values with scale normalization and same-currency enforcement.