New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-proposal-class-static-block

Package Overview
Dependencies
Maintainers
4
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-proposal-class-static-block

Transform class static blocks

7.21.0
latest
Source
npm
Version published
Weekly downloads
4.5M
-0.78%
Maintainers
4
Weekly downloads
 
Created

What is @babel/plugin-proposal-class-static-block?

The @babel/plugin-proposal-class-static-block npm package allows developers to use the static block feature in class definitions within JavaScript code. This feature is a proposal for ECMAScript and is not yet part of the official language specification. The plugin enables Babel to compile code containing static blocks so that it can run in current JavaScript environments.

What are @babel/plugin-proposal-class-static-block's main functionalities?

Static Initialization Blocks

Static initialization blocks allow developers to write a block of code within a class definition that is executed once when the class is created. This is useful for setting up static properties or performing one-time setup for the class.

class MyClass {
  static {
    // Initialization code
    this.myStaticProperty = 'value';
  }
}

Other packages similar to @babel/plugin-proposal-class-static-block

Keywords

babel-plugin

FAQs

Package last updated on 20 Feb 2023

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