示例
Distinguish Decimal precision (significant digits) from decimal places and isolate configuration with Decimal.clone
sha256:bc5fefe1514fa3de4e8ca1d1a13ef72708c6b8d66cf117b904e8c9d0cafc0505
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Distinguish Decimal precision (significant digits) from decimal places and isolate configuration with Decimal.clone HOW
- 包
- decimal.js 10.6.0
- 环境
- node
- 创建时间
- 2026-08-16T07:28:37Z
契约
- assert setting precision limits significant digits not fractional decimal places
- assert Decimal constructor preserves all digits until an arithmetic operation triggers rounding
- assert Decimal.clone isolates configuration changes from the global Decimal constructor
- assert toDecimalPlaces returns an operable Decimal instance while toFixed returns a formatted string
- assert small decimals below toExpNeg format exponentially in toString but fixed-point in toFixed
文件
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9