Niche Portobello Mushroom
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

@suchipi/esquery

1.0.1 • Public • Published

This is a fork of ESQuery that lets you configure the method used to get keys for a given node, eg:

const customAst = {
  type: "Foo",
  children: [
    {
      type: "Bar",
      value: 5
    }
  ]
};
 
const esquery = require("esquery").configure({
  getKeys(node) {
    return Object.keys(node);
  }
});
 
esquery.query(customAst, "Foo > Bar[value=5]"); // [ { type: "Bar", value: 5 } ]

install

npm i @suchipi/esquery

Downloadsweekly downloads

0

version

1.0.1

license

BSD-3-Clause

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability