v1.0.9
v1.0.9
- Add the option
showOnlyto filtergetObjectDiffoutput by status:
{
ignoreArrayOrder?: boolean // false by default,
showOnly?: {
statuses: ("added" | "deleted" | "updated" | "equal")[], // [] by default
granularity?: "basic" | "deep" // "basic" by default
}
}-
ignoreArrayOrder: if set totrue,["hello", "world"]and["world", "hello"]will be considered asequal, because the two arrays have the same value, just not in the same order. -
showOnly: only returns the values whose status interest you. It has two parameters:statuses: status you want to see in the output (ex:["added", "equal"])granularity:basiconly returns the main properties whose status match your request.deepcan return main properties if some of their subproperties' status match your request. The subproperties will be filtered accordingly.
-
Add the option
showOnlyto filtergetListDiffoutput by status:
{
showOnly?: ("added" | "deleted" | "moved" | "updated" | "equal")[], // [] by default
}-
showOnlygives you the option to only return the values whose status interest you (ex:["added", "equal"]). -
Upgrade dev dependencies
-
Add more tests
Breaking changes
- in
getObjectDiffoutput,subPropertiesDiff.nameis now renamedsubPropertiesDiff.property. - The option
discardArrayOrderis now renamedignoreArrayOrder