开发者社区> 镜像站> NPM> acorn-numeric-separator
acorn-numeric-separator

Support for numeric separators in acorn

acorn>=7.4 supports numeric separators
Last updated 4 months ago by adrianheine .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install acorn-numeric-separator 
SYNC missed versions from official npm registry.

Numeric separator support for Acorn

NPM version

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

It implements support for numeric separators as defined in the stage 3 proposal Numeric Separators.

Usage

This module provides a plugin that can be used to extend the Acorn Parser class to parse numeric separators. You can either choose to use it via CommonJS (for example in Node.js) like this

const {Parser} = require('acorn');
const numericSeparator = require('acorn-numeric-separator');
Parser.extend(numericSeparator).parse('100_000');

or as an ECMAScript module like this:

import {Parser} from 'acorn';
import numericSeparator from 'acorn-numeric-separator';
Parser.extend(numericSeparator).parse('100_000');

License

This plugin is released under an MIT License.

Current Tags

  • 0.3.6                                ...           latest (4 months ago)

10 Versions

  • 0.3.6 [deprecated]           ...           4 months ago
  • 0.3.5 [deprecated]           ...           4 months ago
  • 0.3.4 [deprecated]           ...           4 months ago
  • 0.3.3 [deprecated]           ...           6 months ago
  • 0.3.2 [deprecated]           ...           7 months ago
  • 0.3.1 [deprecated]           ...           7 months ago
  • 0.3.0 [deprecated]           ...           2 years ago
  • 0.2.0 [deprecated]           ...           2 years ago
  • 0.1.1 [deprecated]           ...           3 years ago
  • 0.1.0 [deprecated]           ...           3 years ago
Downloads
Today 1
This Week 262
This Month 165
Last Day 77
Last Week 398
Last Month 1,942
Dependencies (0)
None
Dev Dependencies (7)