
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
estree-visitor
Advanced tools

Traverse through Javascript AST as described by ESTree-spec.
Run npm i estree-visitor
Visitor accepts an optional enter function so you can play around with current ESTree node you are on!
const visitor = require("estree-visitor");
const acorn = require("acorn");
const statement = "console.log('hello')"; // pass any JS code
const ast = acorn.parse(statement);
visitor(ast, {
enter: function(currentNode) {
console.log("current node: ", currentNode);
// do more stuff with currentNode
}
});
Check out the demo folder for an example.
cd demo
npm i
npm run start-demo // will run on localhost:1234
MIT
FAQs
Lightweight ESTree traversal
We found that estree-visitor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.