Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 16, 2024 via pnpm

escodegen 2.1.0

ECMAScript code generator
Package summary
Share
0
issues
2
licenses
4
BSD-2-Clause
1
BSD-3-Clause
Package created
3 Mar 2012
Version published
29 Jun 2023
Maintainers
2
Total deps
5
Direct deps
4
License
BSD-2-Clause

Issues

0
This package has no issues

Licenses

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
escodegen@2.1.0
esprima@4.0.1
estraverse@5.3.0
esutils@2.0.3

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
source-map@0.6.1
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

4
All Dependencies CSV
β“˜ This is a list of escodegen 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
esprima4.0.150.86 kBBSD-2-Clause
prod
estraverse5.3.07.86 kBBSD-2-Clause
prod
esutils2.0.39.32 kBBSD-2-Clause
prod
source-map0.6.1194.96 kBBSD-3-Clause
prod optional

Visualizations

Frequently Asked Questions

What does escodegen do?

Escodegen is a powerful toolkit for JavaScript developers. It serves as an ECMAScript (popularly known as JavaScript) code generator that systematically transforms Mozilla's Parser API Abstract Syntax Tree (AST) into executable JavaScript code. Escodegen immensely simplifies the process of creating JavaScript code programmatically, making it an invaluable resource for application developers and software engineers dealing with JavaScript at a lower, more nitty-gritty level.

How do you use escodegen?

Utilizing Escodegen's capabilities is fairly straightforward. The package is available for both web browser and Node.js environments. For a web browser use, the escodegen.browser.js file can be included in your HTML like so:

<script src="escodegen.browser.js"></script>

For Node.js applications, Escodegen can be installed using npm:

npm install escodegen

Writing JavaScript code with Escodegen is simply a matter of calling its generate function and passing it an Abstract Syntax Tree (AST) object:

let code = escodegen.generate({
    type: 'BinaryExpression',
    operator: '+',
    left: { type: 'Literal', value: 40 },
    right: { type: 'Literal', value: 2 }
});
console.log(code);  // outputs: '40 + 2'

Additional configurations can be specified to customize code generation process.

Where are the escodegen docs?

Detailed information about various options, specifications, and customization for Escodegen can be found on the API page of the Escodegen wiki hosted on GitHub at https://github.com/estools/escodegen/wiki/API. This comprehensive resource is a go-to guide for understanding and maximizing the benefits of Escodegen in your coding endeavors.