Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment isStrictEqual

  • isStrictEqual(a: any, b: any): boolean
  • Tests if two arguments are strictly equal.

    Notes

    • The function differs from the === operator in that the function treats -0 and +0 as distinct.

    Parameters

    • a: any

      first input value

    • b: any

      second input value

    Returns boolean

    boolean indicating whether two arguments are strictly equal

    Example

    var bool = isStrictEqual( true, true );
    // returns true

    Example

    var bool = isStrictEqual( 3.14, 3.14 );
    // returns true

    Example

    var bool = isStrictEqual( {}, {} );
    // returns false

    Example

    var bool = isStrictEqual( -0.0, -0.0 );
    // returns true

    Example

    var bool = isStrictEqual( -0.0, 0.0 );
    // returns false

    Example

    var bool = isStrictEqual( NaN, NaN );
    // returns false

    Example

    var bool = isStrictEqual( [], [] );
    // returns false