包详细信息

acorn-static-class-features

acornjs865.3kMIT1.0.0

Support for static class features in acorn

自述文件

Static class features support for Acorn

NPM version

This is a plugin for Acorn - a tiny, fast JavaScript parser, written completely in JavaScript.

It implements support for static class features as defined in the stage 3 proposal Static class features. The emitted AST follows the ESTree experimental Class Features design.

Usage

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

const {Parser} = require('acorn');
const staticClassFeatures = require('acorn-static-class-features');
Parser.extend(staticClassFeatures).parse('class X { static x = 0 }');

License

This plugin is released under an MIT License.

更新日志

1.0.0 (2021-02-08)

  • Update AST node names to match ESTree

0.2.4 (2020-08-13)

  • Mark as compatible with acorn@8
  • Allow super in field initializer
  • Support keywords as field name

0.2.3 (2020-06-11)

  • Don't break acorn's optional chaining support

0.2.2 (2020-05-21)

  • Allow arguments usage in nested static methods
  • Allow numeric class element names

0.2.1 (2020-04-25)

  • Mark as compatible with acorn v7
  • Use injected acorn instance if available
  • Uses Object.getPrototypeOf if available instead of __proto__

0.2.0 (2019-02-09)

  • Require acorn >= 6.1.0

0.1.1 (2018-11-06)

  • Adapt to changes in acorn 6.0.3

0.1.0 (2018-09-14)

Initial release