@cfware/acorn-optional-chainingdeprecated

Support for optional chaining in acorn

Usage no npm install needed!

<script type="module">
  import cfwareAcornOptionalChaining from 'https://cdn.skypack.dev/@cfware/acorn-optional-chaining';
</script>

README

Optional Chaining Support for Acorn

NPM version

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

Purpose of this fork

This fork exists to enable compatibility with rollup 2.x. This will be deprecated and archived once compatibility is merged upstream.

Usage

This module provides a plugin which extends the Acorn Parser class to handle optional chaining:

import * as acorn from 'acorn';
import optionalChaining from 'acorn-optional-chaining';

acorn.Parser.extend(optionalChaining).parse('a?.b?.c');

License

This plugin is released under an MIT License.

It was based off the structure of acorn-numeric-separator.