Skip to main content
Version: 2.0.3

is.bigInt

is.bigInt(target: unknown)โ€‹

is.bigInt is a method that checks whether a value is of the BigInt type or not.

Specificationโ€‹

  • Target argument: required.
  • Checks if the given "target" type is BigInt.

Informationโ€‹

  • Unit tests: โœ…

Examplesโ€‹

is.bigInt(BigInt(1)) // true

is.bigInt(0) // false
is.bigInt(1) // false
is.bigInt(-1) // false
is.bigInt('undefined') // false
is.bigInt('null') // false
is.bigInt(Symbol()) // false
is.bigInt(null) // false
is.bigInt(true) // false
is.bigInt([]) // false
is.bigInt(false) // false
is.bigInt("") // false
is.bigInt('') // false
is.bigInt(``) // false
is.bigInt({}) // false
is.bigInt(undefined) // false
is.bigInt(Function) // false
is.bigInt(() => {}) // false
is.bigInt(BigInt) // false
is.bigInt(Symbol) // false
is.bigInt(NaN) // false
is.bigInt(Infinity) // false
is.bigInt(-Infinity) // false
is.bigInt(Number.POSITIVE_INFINITY) // false
is.bigInt(Number.NEGATIVE_INFINITY) // false
// And all other known types will return false

Reversal boolean resultโ€‹


is.not_bigInt(BigInt(1)) // false

is.not_bigInt(0) // true
is.not_bigInt(1) // true
is.not_bigInt(-1) // true
is.not_bigInt('undefined') // true
is.not_bigInt('null') // true
is.not_bigInt(Symbol()) // true
is.not_bigInt(null) // true
is.not_bigInt(true) // true
is.not_bigInt([]) // true
is.not_bigInt(false) // true
is.not_bigInt("") // true
is.not_bigInt('') // true
is.not_bigInt(``) // true
is.not_bigInt({}) // true
is.not_bigInt(undefined) // true
is.not_bigInt(Function) // true
is.not_bigInt(() => {}) // true
is.not_bigInt(BigInt) // true
is.not_bigInt(Symbol) // true
is.not_bigInt(NaN) // true
is.not_bigInt(Infinity) // true
is.not_bigInt(-Infinity) // true
is.not_bigInt(Number.POSITIVE_INFINITY) // true
is.not_bigInt(Number.NEGATIVE_INFINITY) // true
// And all other known types will return true