Filter function is used to filter out matches before evaluating the [quantifier-expression](https://github.com/gajus/surgeon#quantifier-expression). The filter supports a single expression "[has](https://github.com/gajus/surgeon/issues/8)". Example: ```js test('finds a node which satisfies a parent node selector', (t) => { const x = surgeon(); const document = ` <div> <article> <h1>foo</h1> </article> <article> <h1>bar</h1> <p></p> </article> </div> `; const schema = { filter: { has: 'p' }, properties: { heading: 'h1' }, selector: 'article' }; t.true(x(document, schema).heading === 'bar'); }); ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by gajus and has received 0 comments.