Library API
    Preparing search index...

    Function asInteger

    • Coerces a String or Number to a BigInt.

      Type Parameters

      • T extends string | number | bigint

      Parameters

      • Optionalstr: T

        The value to coerce

      Returns bigint

      The coerced BigInt

      const big = asInteger(123.45); // 123n