Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "assert/is-equal-array/docs/types/index.d"

Index

Functions

Functions

Export assignment isEqualArray

  • isEqualArray(v1: any, v2: any): boolean
  • Tests if two arguments are both generic arrays and have equal values.

    Notes

    • The function performs strict equality comparison; thus, the function treats -0 and +0 as equal and NaNs as distinct.

    Parameters

    • v1: any

      first input value

    • v2: any

      second input value

    Returns boolean

    boolean indicating whether two arguments are equal

    Example

    var x = [ 1.0, 2.0, 3.0 ];
    var y = [ 1.0, 2.0, 3.0 ];
    
    var out = isEqualArray( x, y );
    // returns true

    Example

    var x = [ 1.0, 2.0, 3.0 ];
    var y = [ 1.0, 2.0, 4.0 ];
    
    var out = isEqualArray( x, y );
    // returns false