开发者社区> 镜像站> NPM> acorn-class-fields
acorn-class-fields
Support for class fields in acorn
Last updated 4 months ago by adrianheine .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install acorn-class-fields 
SYNC missed versions from official npm registry.

Class fields support for Acorn

NPM version

This is a plugin for 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. The emitted AST follows an ESTree proposal.

Usage

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

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.

Current Tags

  • 0.3.7                                ...           latest (4 months ago)

13 Versions

  • 0.3.7                                ...           4 months ago
  • 0.3.6                                ...           6 months ago
  • 0.3.5                                ...           6 months ago
  • 0.3.4                                ...           6 months ago
  • 0.3.3                                ...           6 months ago
  • 0.3.2                                ...           7 months ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago