CCC Docs
    Preparing search index...
    • Converts a NumLike value to a Num (bigint).

      Parameters

      • val: NumLike

        The value to convert, which can be a string, number, bigint, or HexLike.

      Returns bigint

      A Num (bigint) representing the value.

      const num = numFrom("12345"); // Outputs 12345n
      const numFromHex = numFrom("0x3039"); // Outputs 12345n