Create a bigint from a number-like value.
bigint
const value = createBigInt('0x010203');console.log(value); // 16909060nconst otherValue = createBigInt(123);console.log(otherValue); // 123n
The created bigint.
If the value is not a number-like value.
The value to create the bigint from.
Create a
bigint
from a number-like value.bigint
.bigint
, it is returned as-is.bigint
.bigint
.Example
Returns
The created bigint.
Throws
If the value is not a number-like value.