Checks whether a value is an integer of type "bigint", "number" or "string" that can be converted using Number, BigInt, and parseInt, getting the same integer.
Number
BigInt
parseInt
isIntegerLike(0) // trueisIntegerLike(252n) // trueisIntegerLike("-87 ") // trueisIntegerLike("0x34") // trueisIntegerLike("20e5") // false (BigInt fails, parseInt returns 20) Copy
isIntegerLike(0) // trueisIntegerLike(252n) // trueisIntegerLike("-87 ") // trueisIntegerLike("0x34") // trueisIntegerLike("20e5") // false (BigInt fails, parseInt returns 20)
3.0.0-beta.3
Checks whether a value is an integer of type "bigint", "number" or "string" that can be converted using
Number,BigInt, andparseInt, getting the same integer.