node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป

eswalk

eswalk

Walks an Esprima parse tree

Example:

var eswalk = require('eswalk');

eswalk(tree, function(node, parent) {
    if (node.type == 'ExpressionStatement' &&
        node.expression.type == 'CallExpression' &&
        node.expression.callee.name == 'define') {
        doSomethingWith(node.expression);
    }
});