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 May 8, 2024 via pnpm

esutils 2.0.3

utility box for ECMAScript language tools
Package summary
Share
0
issues
1
license
1
BSD-2-Clause
Package created
25 Nov 2013
Version published
31 Jul 2019
Maintainers
2
Total deps
1
Direct deps
0
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
1 Packages, Including:
esutils@2.0.3
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 esutils 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does esutils do?

Esutils is a useful package in the ECMAScript utility box, providing a set of tools specifically for the ECMAScript language. Aimed at aiding developers working with ECMAScript, it offers API methods to evaluate whether specific nodes are Expressions, Statements, IterationStatements, and SourceElements as defined by the ECMA262 language specification. It can also help determine if a given character conforms to various syntax rules, such as whether it's a decimal digit, hex digit, octal digit, white space, line terminator, or valid identifier start/part. Furthermore, the esutils package facilitates the identification of keywords, reserved words, and restricted words as per ECMA262 specifications.

How do you use esutils?

Esutils is implemented via the Node.js platform, and it can be integrated into your JavaScript project using a series of API methods as found in the package. Here are a few code examples:

const esutils = require('esutils');

// Use the ast.isStatement function:
let node = { type: 'IfStatement' }; // sample node
let result = esutils.ast.isStatement(node);
console.log(result); // Outputs: true or false

// Use the code.isDecimalDigit function:
let codeVal = 7; // sample decimal code
let isDecimal = esutils.code.isDecimalDigit(codeVal);
console.log(isDecimal); // Outputs: true or false

// Use the keyword.isKeywordES5 function:
let id = 'var'; // sample identifier
let strict = true; // sample strict mode
let isKeyword = esutils.keyword.isKeywordES5(id, strict);
console.log(isKeyword); // Outputs: true or false

These are just a few examples of how you can wield the power of the Esutils utility in your ECMAScript-based project.

Where are the esutils docs?

The documentation for the esutils package, including a comprehensive list and explanation of its functionalities, can be found within the readme file in its GitHub repository. You'll find code snippets for each of its API methods, providing you with hands-on examples of how to utilize this ECMAScript utility box to the full extent. For a more in-depth understanding of the official ECMAScript specifications the package conforms to, you can find them on the official ECMA262 website at https://es5.github.io and http://ecma-international.org/ecma-262/6.0.