@eristack/money
v0.3.1
Published
Money primitives for Eristack
Readme
@eristack/money
JSR 354–inspired money primitives for ERP and business software.
- Immutable
Moneyamounts with strict currency checks - Adaptive
bigint/ decimal engine - Rounding, allocate/split, formatting, and app-supplied FX conversion
Install
pnpm add @eristack/moneyQuick example
import { Money, Rounding, Tax } from "@eristack/money";
const price = Money.of("19.99", "USD");
const tax = price.percentOf("7").with(Rounding.currencyDefault());
const total = Money.sum([price, tax]);
console.log(total.toJSON());
// { currency: "USD", amount: "21.39" }
// Or: price.with(Tax.onExclusive("7")).with(Rounding.currencyDefault())Documentation
- Source of truth:
docs/(markdown +docs/_meta.json) - Website: rendered by
apps/webat/docs/money(Cmd/Ctrl+K search on the site)
Guides:
- Overview
- Getting started
- Advanced arithmetic (totals, %, tax/discount)
- ERP recipes
- API reference
AI agent skills
This package ships Agent Skills via TanStack Intent:
@eristack/money#money-amounts— construct amounts and same-currency arithmetic@eristack/money#money-ledger— rounding, allocate, FX conversion, JSON
If you use an AI coding agent, run:
npx @tanstack/intent@latest install
npx @tanstack/intent@latest list
npx @tanstack/intent@latest load @eristack/money#money-amounts