Socket
Socket
Sign inDemoInstall

@babel/plugin-syntax-class-properties

Package Overview
Dependencies
77
Maintainers
5
Versions
42
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @babel/plugin-syntax-class-properties

Allow parsing of class properties


Version published
Maintainers
5
Install size
1.19 kB
Created

Package description

What is @babel/plugin-syntax-class-properties?

The @babel/plugin-syntax-class-properties npm package allows Babel to parse class properties, enabling developers to use class properties syntax in JavaScript. This plugin is purely syntactical and does not apply any transformations. It is often used in conjunction with transformation plugins to compile class properties to a format compatible with older JavaScript engines.

What are @babel/plugin-syntax-class-properties's main functionalities?

Class Properties Syntax

Enables the use of static and instance class properties directly within class declarations. This syntax is part of the ECMAScript proposal and allows for clearer and more concise class definitions.

class MyClass {
  static myStaticProp = 42;
  myInstanceProp = 'hello';
}

Other packages similar to @babel/plugin-syntax-class-properties

Readme

Source

@babel/plugin-syntax-class-properties

Allow parsing of class properties.

Installation

npm install --save-dev @babel/plugin-syntax-class-properties

Usage

.babelrc

{
  "plugins": ["@babel/plugin-syntax-class-properties"]
}

Via CLI

babel --plugins @babel/plugin-syntax-class-properties script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["@babel/plugin-syntax-class-properties"]
});

Keywords

FAQs

Last updated on 17 Jan 2018

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