is that just aggregating similar filters?

if that's the case, yeah, it does, i.e.

Component A:

`REQ, {kinds: [1], authors: [1]}`

Component B:

`REQ, {kinds: [1], authors: [2]}`

will result in query

`REQ, {kinds: [1], authors: [1, 2]}`

Reply to this note

Please Login to reply.

Discussion

what about the last 2 inputs though, they have same author but different kinds/limit would it merge them too?

I think it will different kinds but not different limits

I'm not 100% confident this code is super robust; I need to add more test cases to it

The problem im trying to solve is to actually diff the filters, but filters can be in any order or combination so in order to diff them i have to expand the filters into this "Flat" object first then diff the flat version and compress it again to get the diff result,

I think have it now but im wondering if its already been done

Expander does something like this:

https://void.cat/d/2jBG5iLBypyqGaQ11SNS6y.webp

Yes, it's documented. Sorry for not answering before :)