Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment deepEqual

  • deepEqual(a: any, b: any): boolean
  • Tests for deep equality between two values.

    Parameters

    • a: any

      first comparison value

    • b: any

      second comparison value

    Returns boolean

    boolean indicating if a is deep equal to b

    Example

    var bool = deepEqual( [ 1, 2, 3 ], [ 1, 2, 3 ] );
    // returns true

    Example

    var bool = deepEqual( [ 1, 2, 3 ], [ 1, 2, '3' ] );
    // returns false

    Example

    var bool = deepEqual( { 'a': 2 }, { 'a': [ 2 ] } );
    // returns false

    Example

    var bool = deepEqual( [], {} );
    // returns false

    Example

    var bool = deepEqual( null, null );
    // returns true