Endo API documentation
    Preparing search index...

    Function Nat

    • If allegedNumber passes the isNat test, then return it as a bigint. Otherwise throw an appropriate error.

      If allegedNum is neither a bigint nor a number, Nat throws a TypeError. Otherwise, if it is not a safely representable non-negative integer, Nat throws a RangeError. Otherwise, it is converted to a bigint if necessary and returned.

      Parameters

      • allegedNum: unknown

      Returns bigint