MVFv3 API Documentation
    Preparing search index...
    • Deeply diffs two objects, returning a new object with the properties on the second object that do not match the first.

      For objects, if the objects are different, the deep diff of the second object is returned. If the objects are the same, the entry is omitted.

      For arrays, if the second array is empty, it is returned. Otherwise, if they contain objects with one of the idKeys (see findIdentifierKey), the objects in the second array are recursively diffed with corresponding object with that identifier key in the first array. If the objects are different, the deep diff of the second object is returned. If the objects are the same, the entry is omitted from the array.

      If a mix of the idkeys is present in an array, which is matched, if any, is undefined.

      If the array does not contain identifiable objects and is different, the second array is returned as is. Otherwise, the array is omitted.

      For simple properties, if the key is the id key, it is always kept. If not, and the property is different, the second property is returned. If the properties are the same, the entry is omitted.

      Type Parameters

      • T extends object
      • K extends string

      Parameters

      • first: T

        The first object.

      • second: T

        The second object.

      • idKeys: readonly K[]

      Returns PartialExcept<T, K>

      A PartialExcept<T, K> object that is the properties on the second object that do not match the first.