Détail du package

acorn-bigint

acornjs110kMITobsolète1.0.0

acorn>=6.2 supports bigint

Support for BigInt in acorn

readme

BigInt support for Acorn

NPM version

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

It implements support for arbitrary precision integers as defined in the stage 4 proposal BigInt: Arbitrary precision integers in JavaScript. The emitted AST follows ESTree.

Usage

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

const {Parser} = require('acorn');
const bigInt = require('acorn-bigint');
Parser.extend(bigInt).parse('100n');

License

This plugin is released under an MIT License.

changelog

1.0.0 (2020-06-11)

  • Remove n from bigint property (according to estree)

0.4.0 (2019-04-04)

  • Make compatible with acorn-numeric-separator

0.3.1 (2018-10-06)

  • Fix creation of BigInt values everywhere (Thanks, Gus Caplan!)

0.3.0 (2018-09-14)

  • Update to new acorn 6 interface
  • Actually support creating BigInt values in AST in Chrome
  • Change license to MIT

0.2.0 (2017-12-20)

  • Emit BigInt values in AST if supported by runtime engine

0.1.0 (2017-12-19)

Initial release