v1.0.9
v1.0.9
- Add the option
showOnly
to filtergetObjectDiff
output 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
:basic
only returns the main properties whose status match your request.deep
can return main properties if some of their subproperties' status match your request. The subproperties will be filtered accordingly.
-
Add the option
showOnly
to filtergetListDiff
output by status:
{
showOnly?: ("added" | "deleted" | "moved" | "updated" | "equal")[], // [] by default
}
-
showOnly
gives you the option to only return the values whose status interest you (ex:["added", "equal"]
). -
Upgrade dev dependencies
-
Add more tests
Breaking changes
- in
getObjectDiff
output,subPropertiesDiff.name
is now renamedsubPropertiesDiff.property
. - The option
discardArrayOrder
is now renamedignoreArrayOrder