Function propertiesAreEqual

  • Checks whether two objects have equal properties.

    Type Parameters

    • TObject extends object

    • TKey extends string | number | symbol = keyof TObject

    Parameters

    • first: TObject

      First object to check.

    • second: TObject

      Second object to check.

    • Optional valuesAreEqual: null | (<TPropertyKey>(this, first, second, key) => boolean)

      A function that compares corresponding property values. Accepts property values from both objects and their key as parameters. Returns true if property values are equal. By default, checks property values for strict equality.

    • keys: Iterable<TKey> | ((this, first, second) => Iterable<TKey>) = propertiesAreEqual$ownKeys

      Either an iterable of property keys to compare, or a function returning one. Defaults to own keys (Reflect.ownKeys) of both objects.

    Returns boolean

    true if valuesAreEqual returned true for each property key, or false otherwise.

Generated using TypeDoc