🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

acorn-class-fields

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
a

acorn-class-fields

Support for class fields in acorn

1.0.0
latest
100

Supply Chain Security

100

Vulnerability

75

Quality

80

Maintenance

100

License

Version published
Weekly downloads
229K
-0.42%
Maintainers
3
Weekly downloads
 
Created
Issues
0

Class fields support for Acorn

NPM version

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

It implements support for class fields as defined in the stage 3 proposal Class field declarations for JavaScript. 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 classFields = require('acorn-class-fields');
Parser.extend(classFields).parse('class X { x = 0 }');

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