Ejemplo
Distinguish Decimal precision (significant digits) from decimal places and isolate configuration with Decimal.clone
sha256:bc5fefe1514fa3de4e8ca1d1a13ef72708c6b8d66cf117b904e8c9d0cafc0505
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Distinguish Decimal precision (significant digits) from decimal places and isolate configuration with Decimal.clone HOW
- Paquetes
- decimal.js 10.6.0
- Entorno
- node
- Creado
- 2026-08-16T07:28:37Z
Contrato
- 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
Archivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- src/index.mjs
- test/contract.mjs
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9