isBigInt
Determine if a value is a BigInt
63 bytes
currently in beta
Usage
Pass in a value and get a boolean telling you if the value is a bigint, using the typeof operator.
import * as import _
_ from 'radashi'
import _
_.function isBigInt(value: unknown): value is bigint
Return true if the give value is a BigInt.
isBigInt(0n) // => trueimport _
_.function isBigInt(value: unknown): value is bigint
Return true if the give value is a BigInt.
isBigInt(var BigInt: BigIntConstructor(value: bigint | boolean | number | string) => bigint
BigInt(0)) // => trueimport _
_.function isBigInt(value: unknown): value is bigint
Return true if the give value is a BigInt.
isBigInt(12) // => falseimport _
_.function isBigInt(value: unknown): value is bigint
Return true if the give value is a BigInt.
isBigInt('0n') // => false