Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

acorn-private-methods

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-private-methods

Support for private methods in acorn

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
191K
increased by1.61%
Maintainers
3
Weekly downloads
 
Created
Source

Private methods and getter/setters support for Acorn

NPM version

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

It implements support for private methods, getters and setters as defined in the stage 3 proposal Private methods and getter/setters for JavaScript classes. The emitted AST follows the ESTree experimental Class Features design.

Usage

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

const {Parser} = require('acorn');
const privateMethods = require('acorn-private-methods');
Parser.extend(privateMethods).parse('class X { #a() {} }');

or as an ECMAScript Module:

import {Parser} from 'acorn';
import privateMethods from 'acorn-private-methods';
Parser.extend(privateMethods).parse('class X { #a() {} }');

License

This plugin is released under an MIT License.

FAQs

Package last updated on 08 Feb 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc