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

    Function isArrayLike

    • Checks whether a value is array-like.

      A value is considered array-like if:

      • It is a string or a non-function object.
      • It has a "length" property that is a non-negative integer.
      • Its length does not exceed Number.MAX_SAFE_INTEGER.

      Type Parameters

      • V = any

      Parameters

      • value: any

      Returns value is ArrayLike<V>

      isArrayLike("Some string")            // true
      isArrayLike({ 0: "a", length: 1.5 }) // false (length not integer)
      isArrayLike({ 0: "a", length: 2 }) // true
      isArrayLike({ 0: 346, length: 1n }) // false (length of type "bigint")

      3.0.0-beta.3