# acorn-class-fields

> Support for class fields in acorn

Latest version **1.0.0** (published 2021-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install acorn-class-fields
pnpm add acorn-class-fields
yarn add acorn-class-fields
bun add acorn-class-fields
```

## 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 | 1.0.0 |
| Published | 2021-02-08 |
| First published | 2018-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.8.2 |
| Dependencies | 1 |
| Unpacked size | 26.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Maintainers | marijn, adrianheine, rreverser |

## Links

- npm: https://www.npmjs.com/package/acorn-class-fields
- Repository: https://github.com/acornjs/acorn-class-fields
- npm.io page: https://npm.io/package/acorn-class-fields

## Dependencies (1)

- [acorn-private-class-elements](https://npm.io/package/acorn-private-class-elements.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2021-02-08
- 0.3.7 — 2020-08-13
- 0.3.6 — 2020-06-11
- 0.3.5 — 2020-06-11
- 0.3.4 — 2020-05-21
- 0.3.3 — 2020-05-20
- 0.3.2 — 2020-04-23
- 0.3.1 — 2019-02-09
- 0.3.0 — 2019-02-09
- 0.2.1 — 2018-11-06
- 0.2.0 — 2018-09-14
- 0.1.2 — 2018-01-26
- 0.1.1 — 2018-01-17
- 0.1.0 — 2018-01-13

## README

# Class fields support for Acorn

[![NPM version](https://img.shields.io/npm/v/acorn-class-fields.svg)](https://www.npmjs.org/package/acorn-class-fields)

This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.

It implements support for class fields as defined in the stage 3 proposal [Class field declarations for JavaScript](https://github.com/tc39/proposal-class-fields). The emitted AST follows the [ESTree experimental Class Features design](https://github.com/estree/estree/blob/master/experimental/class-features.md).

## Usage

This module provides a plugin that can be used to extend the Acorn `Parser` class:

```javascript
const {Parser} = require('acorn');
const classFields = require('acorn-class-fields');
Parser.extend(classFields).parse('class X { x = 0 }');
```

## License

This plugin is released under an [MIT License](./LICENSE).

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