@metreeca/core - v0.9.18
    Preparing search index...

    Function isArray

    • Checks if a value is an array.

      Supports two validation modes:

      • Element predicate: validates all elements with a single predicate function
      • Tuple template: validates each element against a corresponding predicate function

      Type Parameters

      • T = unknown

        The type of array elements

      Parameters

      • value: unknown

        The value to check

      • Optionalis:
            | ((value: unknown, index: number) => boolean)
            | readonly ((value: unknown, index: number) => boolean)[]

        Optional element predicate or tuple template:

        • As function: validates all elements; receives the element value and its index
        • As array: validates as tuple; each element must match the corresponding predicate

      Returns value is T[]

      True if the value is an array matching the validation criteria; false otherwise

      Tuple templates require exact length match.