Hi all, I remember a library that would automatically build an esquery selector for you based on some sample code with an underscore, e.g. var x = 1 + _ might build a selector like BinaryExpression Literal:nth-child(2)
var x = 1 + _
BinaryExpression Literal:nth-child(2)
Does anyone remember the name?
For a little more context, imagine the source code is: var example = 3
var example = 3
Then you use this sample code with the underscore (placeholder accepted anywhere an identifier will go): var example = _
var example = _
It will product the selector:
VariableDeclaration > VariableDeclarator[id.name="example"] .init
Then when you use this selector with the source code, you find:
{ "type": "Literal", "value": 3, "raw": "3" }