Convert a Decimal to a JavaScript number. Use with caution - this may lose precision for very large or very small values.
The Decimal instance to convert
JavaScript number representation
const d = new Decimal("123.456");const n = decimalToNumber(d); // 123.456 Copy
const d = new Decimal("123.456");const n = decimalToNumber(d); // 123.456
Convert a Decimal to a JavaScript number. Use with caution - this may lose precision for very large or very small values.