acorn-numeric-separator

Support for numeric separators in acorn

acorn>=7.4 supports numeric separators
Last updated 6 years 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 (6 years ago)

10 Versions

  • 0.3.6 [deprecated]           ...           6 years ago
  • 0.3.5 [deprecated]           ...           6 years ago
  • 0.3.4 [deprecated]           ...           6 years ago
  • 0.3.3 [deprecated]           ...           6 years ago
  • 0.3.2 [deprecated]           ...           6 years ago
  • 0.3.1 [deprecated]           ...           6 years ago
  • 0.3.0 [deprecated]           ...           7 years ago
  • 0.2.0 [deprecated]           ...           8 years ago
  • 0.1.1 [deprecated]           ...           8 years ago
  • 0.1.0 [deprecated]           ...           8 years ago
Downloads
Today 0
This Week 1
This Month 11
Last Day 1
Last Week 10
Last Month 1
Dependencies (0)
None
Dev Dependencies (7)

Copyright 2013 - present © cnpmjs.org | Home |