
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
javascript-idents
Advanced tools
javascript-idents walks a JavaScript AST and collects all Identifier AST nodes. It relies on Marijn Haverbeke's acorn.js for AST walking, and it should be compatible with any SpiderMonkey Parser API-compliant JavaScript AST.
It is intended for use in node.js but can be adapted to work in other JavaScript environments.
Documentation: javascript-idents on Sourcegraph
The following example prints the name of each Identifier AST node to the console.
var acorn = require('acorn'), idents = require('javascript-idents');
var src = 'var c = a.b[d]; function f(w, x, y) { return z; }';
var astNode = acorn.parse(src);
idents.inspect(astNode, function(ident) {
console.log('Ident:', ident.name);
});
// output:
// Ident: c
// Ident: a
// Ident: b
// Ident: d
// Ident: f
// Ident: w
// Ident: x
// Ident: y
// Ident: z
Run npm test
.
FAQs
Walks a JavaScript AST and collects Identifier nodes
The npm package javascript-idents receives a total of 0 weekly downloads. As such, javascript-idents popularity was classified as not popular.
We found that javascript-idents 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.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.