@cfware/acorn-private-class-elements

Helpers for supporting private class methods and fields in acorn

Usage no npm install needed!

<script type="module">
  import cfwareAcornPrivateClassElements from 'https://cdn.skypack.dev/@cfware/acorn-private-class-elements';
</script>

README

Helpers for supporting private class methods and fields for Acorn

NPM version

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

It provides helpers for implementing support for private class elements. The emitted AST follows an ESTree proposal.

Installation

Installing this module requires taking advantage of npm's aliases feature:

npm install -D acorn-private-class-elements@npm:@cfware/acorn-private-class-elements

This will allow other acorn plugins which depend on acorn-private-class-elements@^0.1.0 to use this module instead.

Purpose of this fork

This fork is to obtain bug-fixes that have not been merged into the upstream project:

  • Compatibility with acorn 7.x (merged upstream)
  • Move mocha to devDependencies (merged upstream)
  • Use Parser.acorn if available

Only production bug fixes will be accepted here and only if they are also submitted to upstream.

License

This plugin is released under an MIT License.