
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
@nodesecure/estree-ast-utils
Advanced tools
Utilities for AST (ESTree compliant)
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i @nodesecure/estree-ast-utils
# or
$ yarn add @nodesecure/estree-ast-utils
import { VariableTracer } from "@nodesecure/estree-ast-utils";
const tracer = new VariableTracer().enableDefaultTracing();
const data = tracer.getDataFromIdentifier("identifier...here");
console.log(data);
Translate an ESTree ArrayExpression into an iterable of Literal value.
["foo", "bar"];
will return "foo" then "bar".
Return all Literal part of a given Binary Expression.
"foo" + "bar";
will return "foo" then "bar".
One of the options of the method is stopOnUnsupportedNode, if true it will throw an Error if the left or right side of the Expr is not a supported type.
Return the identifier name of the CallExpression (or null if there is none).
foobar();
will return "foobar".
Return the identifier name of the CallExpression (or null if there is none).
foo.bar();
will return "foo" then "bar".
Get all variables identifier name.
const [foo, bar] = [1, 2];
will return "foo" then "bar".
Return true if the given Node is a Literal Regex Node.
/^hello/g;
Thanks goes to these wonderful people (emoji key):
Gentilhomme 💻 🛡️ ⚠️ 🐛 | Kouadio Fabrice Nguessan 🚧 |
MIT
FAQs
Utilities for AST (ESTree compliant)
The npm package @nodesecure/estree-ast-utils receives a total of 1,215 weekly downloads. As such, @nodesecure/estree-ast-utils popularity was classified as popular.
We found that @nodesecure/estree-ast-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.