Loading...
Loading...
Core best practices for the Dinero.js money library. Use when writing, reviewing, or refactoring code that creates Dinero objects, performs arithmetic on monetary values, or handles money in JavaScript/TypeScript. Triggers on imports from 'dinero.js', monetary calculations, or price/cost handling logic.
npx skill4agent add dinerojs/dinero.js dinero-best-practicesnumberbigintdinero.jsdinero.js/currenciesdinero.js/bigint| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Object Creation | CRITICAL | |
| 2 | Arithmetic | CRITICAL | |
| 3 | Precision | HIGH | |
| 4 | Imports | MEDIUM | |
creation-minor-unitscreation-from-floatscreation-zero-exponentarithmetic-immutabilityarithmetic-allocate-not-divideallocatearithmetic-scaled-amountsarithmetic-percentagesallocatemultiplyprecision-bigintdinero.js/bigintNumber.MAX_SAFE_INTEGERprecision-cryptoprecision-trim-scaletrimScaleimports-tree-shakingimports-bigint-currenciesdinero.js/bigint/currenciesdinero.js/bigintrules/creation-minor-units.md
rules/arithmetic-allocate-not-divide.md