The getDeltaType
method is a tool of jsondiffpatch that generates a delta object representing the difference between two JSON values. This method analyzes a delta object to determine the type of change it represents. The delta types include added, deleted, modified, unchanged, and unknown.
delta
: The delta object to inspect.path
: An optional path (string or array of strings) to a specific part of the delta object.options
: An optional object with the following properties:
deep
: A boolean indicating whether to inspect deeply into nested objects and arrays.The function returns a value from the DELTA_TYPE
enum, indicating the type of change detected:
The method handles different structures of delta objects, including arrays and objects, and interprets them according to the specified path and options.
The deep
option allows for detailed inspection of nested structures within the delta object, providing flexibility in how changes are detected and classified.