deep-trails - v3.0.0-beta.3
    Preparing search index...

    Function isIntegerLike

    • 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.

      Parameters

      • value: unknown

      Returns value is string | number | bigint

      isIntegerLike(0)        // true
      isIntegerLike(252n) // true
      isIntegerLike("-87 ") // true
      isIntegerLike("0x34") // true
      isIntegerLike("20e5") // false (BigInt fails, parseInt returns 20)

      3.0.0-beta.3