Skip to main content

CommonArraysEqual

Callable

  • CommonArraysEqual<T>(a1: T, a2: readonly any[], ignoreOrder?: boolean): a2 is T

  • Checks whether two arrays are equal. The arrays are considered equal if they have the same length and contain the same items in the same order, as determined by === comparison


    Type parameters

    • T: readonly any[]

    Parameters

    • a1: T

      The first array to compare

    • a2: readonly any[]

      The second array to compare

    • optionalignoreOrder: boolean = false

      Whether to ignore item order when considering equality

    Returns a2 is T

    • TRUE if both arrays have the same length and contain the same items in the same order, FALSE otherwise