🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

esutils

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esutils

utility box for ECMAScript language tools

2.0.3
latest
Source
npm
Version published
Weekly downloads
58M
1.77%
Maintainers
2
Weekly downloads
 
Created

What is esutils?

The esutils npm package is a utility library for ECMAScript language tools. It provides various utility functions to help with the manipulation and validation of ECMAScript (JavaScript) code.

What are esutils's main functionalities?

AST (Abstract Syntax Tree) Validation

This feature allows you to validate if a string is a valid ECMAScript identifier, keyword, or reserved word.

const esutils = require('esutils');
let isValidIdentifier = esutils.keyword.isIdentifierName('myIdentifier'); // true

Code Generation

This feature helps in determining if a string is a reserved word in ECMAScript for a given version.

const esutils = require('esutils');
let isReservedWord = esutils.keyword.isReservedWord('super', 6); // true

Literal Analysis

This feature provides functions to analyze literals in the AST, such as checking if a node is a string literal.

const esutils = require('esutils');
let isStringLiteral = esutils.ast.isStringLiteral({ type: 'Literal', value: 'Hello' }); // true

Other packages similar to esutils

FAQs

Package last updated on 31 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts