GitXplorerGitXplorer
g

grasp-equery

public
5 stars
2 forks
1 issues

Commits

List of commits on branch master.
Unverified
5de1162c53aa284fb36d9b43a3703c7c1ed8f43a

0.4.0

ggkz committed 8 years ago
Unverified
fd45b38d92f504e70736bdd3696eebf2fdf5bf76

Use flow parser

ggkz committed 8 years ago
Unverified
2071bd526c21e5c0cdb4923e70b10e8f79dcc22e

0.3.2

ggkz committed 8 years ago
Unverified
92d0ec6bcbde15da3889dbed7b0d91180b4e1bc2

Check for non-existant spec

ggkz committed 8 years ago
Unverified
a41aecfff9009c0fa00f5cbb361a7e73ef9b77dd

0.3.1

ggkz committed 9 years ago
Unverified
923d60815b47492a45810cf5ebb7b9b79af0578d

update dependencies

ggkz committed 9 years ago

README

The README file for this repository.

grasp equery Build Status

A query engine for grasp - use JavaScript code examples with wildcards.

For documentation on the selector format, see the grasp page on equery.

See also the other query engine for grasp: squery.

Usage

Add grasp-equery to your package.json, and then require it: var equery = require('grasp-equery);.

The squery object exposes four properties: three functions, parse, queryParsed, query, and the version string as VERSION.

Use parse(selector) to parse a string selector into a parsed selector.

Use queryParsed(parsedSelector, ast) to query your parsed selector.

query(selector, ast) is shorthand for doing queryParsed(parse(selector), ast).

The AST must be in the Mozilla SpiderMonkey AST format - you can use acorn to parse a JavaScript file into the format.

If you are using one selector for multiple ASTs, parse it first, and then feed the parsed version to queryParsed. If you are only using the selector once, just use query.