@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 } ]

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    36
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    36

Package Sidebar

Install

npm i @suchipi/esquery

Weekly Downloads

36

Version

1.0.1

License

BSD-3-Clause

Unpacked Size

93.7 kB

Total Files

5

Last publish

Collaborators

  • suchipi