Mayson Monorepo Documentation
    Preparing search index...

    Function isZeroOrDust

    • Check if a Decimal value is zero or effectively zero (less than dust threshold).

      Parameters

      • decimal: Decimal

        The Decimal instance to check

      • dustThreshold: number = 0.00000001

        Optional threshold for considering a value as zero (default: 0.00000001)

      Returns boolean

      true if the value is zero or below dust threshold

      isZeroOrDust(toDecimal("0")); // true
      isZeroOrDust(toDecimal("0.000000001")); // true (below default dust)
      isZeroOrDust(toDecimal("0.001")); // false