We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter function is used to filter out matches before evaluating the quantifier-expression.
The filter supports a single expression "has".
Example:
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'); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Filter function is used to filter out matches before evaluating the quantifier-expression.
The filter supports a single expression "has".
Example:
The text was updated successfully, but these errors were encountered: