Options
All
  • Public
  • Public/Protected
  • All
Menu

Module eq

Index

References

Functions Lang

References

Renames and re-exports eq

Lang Functions

  • eq(value: any, other: any): boolean
  • Performs a SameValueZero comparison between two values to determine if they are equivalent.

    since

    5.5.0

    example
    const object = { 'a': 1 }
    const other = { 'a': 1 }

    eq(object, object)
    // => true

    eq(object, other)
    // => false

    eq('a', 'a')
    // => true

    eq('a', Object('a'))
    // => false

    eq(NaN, NaN)
    // => true

    Parameters

    • value: any

      The value to compare.

    • other: any

      The other value to compare.

    Returns boolean

    Returns true if the values are equivalent, else false.