Skip to content

v1.0.9

Compare
Choose a tag to compare
@DoneDeal0 DoneDeal0 released this 11 Feb 13:37
· 14 commits to master since this release

v1.0.9

  • Add the option showOnly to filter getObjectDiff 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 to true, ["hello", "world"] and ["world", "hello"] will be considered as equal, 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 filter getListDiff 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 renamed subPropertiesDiff.property.
  • The option discardArrayOrder is now renamed ignoreArrayOrder