ESQuery is a library for querying the AST output by Esprima for patterns of syntax using a CSS style selector system. Check out the demo:
The following selectors are supported:
[attr=/foo.*/]or (with flags)
FunctionDeclaration > Identifier.id
parent > child
node ~ sibling
node + adjacent
:matches([attr] > :first-child, :last-child)
!IfStatement > [name="foo"]
A query library for ECMAScript AST using a CSS selector like query language.
The npm package esquery receives a total of 25,814,409 weekly downloads. As such, esquery popularity was classified as popular.
We found that esquery demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.