Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 14, 2024 via pnpm

esrecurse 3.0.0

ECMAScript scope analyzer
Package summary
Share
4
issues
2
high severity
license
2
2
low severity
license
2
1
license
2
BSD
Package created
2 Dec 2014
Version published
14 Mar 2015
Maintainers
3
Total deps
2
Direct deps
1
License
UNKNOWN

Issues

4

2 high severity issues

high
Recommendation: Validate that the package complies with your license policy
via: esrecurse@3.0.0
Recommendation: Validate that the package complies with your license policy
via: estraverse@3.0.0
Collapse
Expand

2 low severity issues

low
Recommendation: Read and validate the license terms
via: esrecurse@3.0.0
Recommendation: Read and validate the license terms
via: estraverse@3.0.0
Collapse
Expand

Licenses

BSD

Invalid
Not OSI Approved
2 Packages, Including:
esrecurse@3.0.0
estraverse@3.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of esrecurse 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
estraverse3.0.07.92 kBBSD
prod
1
1

Visualizations

Frequently Asked Questions

What does esrecurse do?

Esrecurse is a JavaScript package, specifically designed for parsing ECMAScript, which provides recursive traversing functionality. It's a powerful tool for navigating and analyzing the abstract syntax tree (AST) of your JavaScript code.

How do you use esrecurse?

To use esrecurse, you can call the visit function with your AST and a visitor object that defines methods for the types of nodes you're interested in. For instance, to visit all variables declared at the root of a file, your code would look like this:

esrecurse.visit(ast, {
    VariableDeclaration: function (node) {
        this.visit(node.init);
        // Further operations...
    }
});

Alternatively, you can create a Visitor instance:

var visitor = new esrecurse.Visitor({
    VariableDeclaration: function (node) {
        this.visit(node.init);
        // Further operations...
    }
});

visitor.visit(ast);

If you want to customize the Visitor object, esrecurse allows for easy instantiation of Visitor instances:

class MyVisitor extends esrecurse.Visitor {
    constructor()
    {
        super(null);
    }
}

MyVisitor.prototype.VariableDeclaration = function (node) {
    this.visit(node.init);
    // Further operations...
};

To override the default visiting operation, you can call the visitChildren(node) function from within your custom visitor methods:

MyVisitor.prototype.VariableDeclaration = function(node) {
    this.visitChildren(node);
};

Esrecurse also supports user-defined node types and provides options to handle unknown nodes with the fallback option. In addition to the standard visit function, there are also various methods and options for customizing behavior, including user-defined node types and visiting unknown nodes.

Where are the esrecurse docs?

Documentation of esrecurse can be found on its GitHub page. Here, you will find all the essential information on how to use the package, options, examples, and so on. For an in-depth exploration of using esrecurse and understanding its features, the source code provides the most detailed insights.