Socket
Socket
Sign inDemoInstall

acorn-numeric-separator

Package Overview
Dependencies
1
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    acorn-numeric-separator

Support for numeric separators in acorn


Version published
Weekly downloads
37K
increased by19.97%
Maintainers
3
Install size
66.5 kB
Created
Weekly downloads
 

Changelog

Source

0.3.6 (2020-08-13)

  • Mark as compatible with acorn@8

Readme

Source

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.

FAQs

Last updated on 13 Aug 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc