DoneDeal0 / superdiff

Superdiff compares two arrays or objects and returns a full diff of their differences in a readable format.
https://www.npmjs.com/package/@donedeal0/superdiff
439 stars 3 forks source link

[Feature request] Allow filtering of statuses #9

Closed omonk closed 1 year ago

omonk commented 1 year ago

When dealing with large objects it would be very handy to be able to pass an array of statuses to filter out those you're not interested in.

type Options = {
    discardArrayOrder?: boolean;
    statuses: DiffStatus[]
};
const diff = getObjectDiff(
   audience,
   newAudience,
   { statuses: ["updated"] }
);
DoneDeal0 commented 1 year ago

Hi @omonk, thanks for the feature request! It sounds great, I'll implement it when I have some free time.

DoneDeal0 commented 1 year ago

It's done. Please see the release note or the documentation for more details. If you need any help, or have any remarks about this new feature please let me know.

You now have complete control over your output (object and list). You can either focus on the main properties only or check their subproperties as well. I hope this meets your expectations.

omonk commented 7 months ago

@DoneDeal0 - I never thanked you for such a quick turn around time! So, thank you!

DoneDeal0 commented 7 months ago

No problem, thank you so much for the coffee, I highly appreciate it!