Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

acornjs/acorn-bigint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.