This package has been deprecated

Author message:

this package is no longer on npm

quenya-estree

1.0.2 • Public • Published

Quenya ESTree Enhancer

Uses an ESTree-compatible parser to enhance Quenya doc objects with the JS AST node their context points to.

npm install quenya-estree

Usage

const quenyaESTree = require('quenya-estree')
 
quenyaESTree([quenya objects...], options)
.catch(err => void console.error(err))
.then(docs => {
  docs.forEach(doc => void console.log(doc))
  // ...
})

Options

  • discard (boolean, defaults to false): If true, return only objects for which an AST node was found; if false, pass-through all others too.

  • parser (function, required): Will be passed a path, should return a Promise that resolves to the AST or an error.

  • filter (function, defaults to checking the extension matches .js and the doc has a non-null context): Will be passed a path, should return truthy if the described file should be parsed and falsy otherwise.

Parsers

There are five already-Promisified parsers available (but of course you may plug in your own):

Package Sidebar

Install

npm i quenya-estree

Weekly Downloads

0

Version

1.0.2

License

ISC

Last publish

Collaborators

  • passcod