tguard-js
    Preparing search index...

    Function isArray

    • Determines whether the provided value is an array.

      Parameters

      • x: unknown

        The value to be checked.

      Returns x is unknown[]

      true if the value is an array, otherwise false.

      This function performs a runtime check using Array.isArray and narrows the value to unknown[].

      It does not validate the types of the array elements. To ensure element type safety, use isArrayOf.

      Value Result
      [] true
      [1, 2, 3] true
      'text' false
      {} false
      null false
      undefined false

      1.0