Mayson Monorepo Documentation
    Preparing search index...

    Function decimalToNumber

    • Convert a Decimal to a JavaScript number. Use with caution - this may lose precision for very large or very small values.

      Parameters

      • decimal: Decimal

        The Decimal instance to convert

      Returns number

      JavaScript number representation

      const d = new Decimal("123.456");
      const n = decimalToNumber(d); // 123.456