# nightly-esprima

> ECMAScript parsing infrastructure for multipurpose analysis

Latest version **2021.8.30** (published 2021-08-30) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install nightly-esprima
pnpm add nightly-esprima
yarn add nightly-esprima
bun add nightly-esprima
```

Provides the commands `esparse`, `esvalidate`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2021.8.30 |
| Published | 2021-08-30 |
| First published | 2021-06-11 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 323.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7138 |
| Author | Ariya Hidayat |
| Maintainers | ariya |
| Keywords | ast, ecmascript, esprima, javascript, parser, syntax |

## Links

- npm: https://www.npmjs.com/package/nightly-esprima
- Repository: https://github.com/jquery/esprima
- Homepage: http://esprima.org
- Issues: https://github.com/jquery/esprima/issues
- npm.io page: https://npm.io/package/nightly-esprima

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2021.8.30 (latest) — 2021-08-30
- 2021.7.10 — 2021-07-10
- 2021.7.2 — 2021-07-02
- 2021.6.14 — 2021-06-14
- 2021.6.11 — 2021-06-11

## README

**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance,
standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
parser written in ECMAScript (also popularly known as
[JavaScript](https://en.wikipedia.org/wiki/JavaScript)).
Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat),
with the help of [many contributors](https://github.com/jquery/esprima/contributors).

### Features

- Full support for ECMAScript 2019 ([ECMA-262 10th Edition](http://www.ecma-international.org/publications/standards/Ecma-262.htm))
- Sensible [syntax tree format](https://github.com/estree/estree/blob/master/es5.md) as standardized by [ESTree project](https://github.com/estree/estree)
- Experimental support for [JSX](https://facebook.github.io/jsx/), a syntax extension for [React](https://facebook.github.io/react/)
- Optional tracking of syntax node location (index-based and line-column)
- [Heavily tested](http://esprima.org/test/ci.html) (~1600 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima))

### API

Esprima can be used to perform [lexical analysis](https://en.wikipedia.org/wiki/Lexical_analysis) (tokenization) or [syntactic analysis](https://en.wikipedia.org/wiki/Parsing) (parsing) of a JavaScript program.

A simple example on Node.js REPL:

```javascript
> var esprima = require('nightly-esprima');
> var program = 'const answer = 42';

> esprima.tokenize(program);
[ { type: 'Keyword', value: 'const' },
  { type: 'Identifier', value: 'answer' },
  { type: 'Punctuator', value: '=' },
  { type: 'Numeric', value: '42' } ]
  
> esprima.parseScript(program);
{ type: 'Program',
  body:
   [ { type: 'VariableDeclaration',
       declarations: [Object],
       kind: 'const' } ],
  sourceType: 'script' }
```

For more information, please read the [complete documentation](http://esprima.org/doc).

---
_Source: https://npm.io/package/nightly-esprima · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
