2 个仓库
Libraries that provide immutable money objects with safe addition, subtraction, comparison, and formatting operations.
Distinct from Immutable Date Libraries: Distinct from Immutable Date Libraries: applies the immutable pattern specifically to monetary values rather than dates.
Explore 2 awesome GitHub repositories matching data & databases · Monetary Value Objects. 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
Provides immutable money objects with safe arithmetic, comparison, and formatting operations.
这是一个用于使用值对象处理财务计算的 PHP 库。它将货币金额表示为整数,以避免浮点精度错误,并确保处理和存储过程中的数学准确性。 该库利用不可变值对象模式,其中计算返回新实例以防止副作用。它采用货币感知算术来限制数学运算仅在共享相同货币的对象之间进行,并使用基于接口的逻辑将货币转换委托给外部汇率提供商。 功能包括用于本地化人类可读字符串的国际货币格式化,以及用于跨网络 API 传输货币数据的标准化 JSON 序列化。
Provides immutable value objects that represent monetary amounts as integers to ensure mathematical accuracy.