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 Mar 18, 2024 via pnpm

esprima 1.0.2

ECMAScript parsing infrastructure for multipurpose analysis
Package summary
Share
2
issues
1
high severity
license
1
1
low severity
license
1
1
license
1
BSD
Package created
25 Nov 2011
Version published
6 Nov 2012
Maintainers
1
Total deps
1
Direct deps
0
License
UNKNOWN

Issues

2

1 high severity issue

high
Recommendation: Validate that the package complies with your license policy
via: esprima@1.0.2
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: esprima@1.0.2
Collapse
Expand

Licenses

BSD

Invalid
Not OSI Approved
1 Packages, Including:
esprima@1.0.2
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

0
All Dependencies CSV
β“˜ This is a list of esprima 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does esprima do?

Esprima is a standard-compliant, high-performance ECMAScript parser written in ECMAScript itself, popularly known as JavaScript. Esprima provides an infrastructure that can deliver a multipurpose analysis of ECMAScript codes, ensuring full support for ECMAScript 2017. Feature-wise, Esprima offers tokenization through lexical analysis and parsing of a JavaScript program through syntactic analysis.

How do you use esprima?

Esprima is generally used through Node.js. To start with, you'll need to require esprima in your program before proceeding with the lexical analysis or syntactic analysis.

  1. For lexical analysis, here's an example of how you can tokenize your code using Esprima:
var esprima = require('esprima');
var program = 'const answer = 42';
esprima.tokenize(program);

This will return each element of the 'program' variable along with their types organized in an array of objects.

  1. For syntactic analysis, you can parse your code using Esprima as follows:
var esprima = require('esprima');
var program = 'const answer = 42';
esprima.parseScript(program);

This will return the parsed syntax tree of the 'program' variable.

Where are the esprima docs?

The complete documentation of esprima, which includes additional details about the usage and functionalities of Esprima, can be found at the esprima official website esprima.org/doc. You can also gain detailed insights about Esprima's implementation on their GitHub repository.