
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
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
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.