DiffUtility
Index
Constructors
constructor
Returns DiffUtility
Methods
staticdiffArray
Parameters
a: UnknownNode
previous node.
b: UnknownNode
latest node.
field: string
string representing the field parent uses to reference the array.
Returns Diff[]
staticdiffArrayOfObjects
Generate a deep diff of an array of objects from the previous node vs the latest node.
Parameters
a: UnknownNode
previous node.
b: UnknownNode
latest node.
field: string
string representing the field parent uses to reference the array.
compare: (object1: any, object2: any) => boolean
function to check if two objects are equal.
Returns Diff[]
staticdiffMap
Generate a deep diff of a map of basic types from the previous node vs the latest node.
Parameters
a: UnknownNode
previous node.
b: UnknownNode
latest node.
field: string
string representing the field parent uses to reference the map.
Returns Diff[]
staticdiffNodes
Generate a deep diff of an array of previous node vs latest node. The diff is generated recursively, i.e. all children of the node are included in the diff.
Parameters
a: UnknownNode[]
array of previous nodes.
b: UnknownNode[]
array of latest nodes.
field: string
string representing the unique identifier of the node.
Returns Promise<Diff[]>
staticdiffObject
Generate a deep diff of an object from the previous node vs the latest node.
Parameters
a: UnknownNode
previous node.
b: UnknownNode
latest node.
field: string
string representing the field parent uses to reference the object.
Returns Diff[]
staticisObjectDeepEquals
Parameters
x: object
y: object
Returns boolean
Generate a deep diff of an array of basic types from the previous node vs the latest node.