
Product
Introducing Repository Labels and Security Policies
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
@babel/plugin-syntax-class-static-block
Advanced tools
The @babel/plugin-syntax-class-static-block npm package allows Babel to parse static blocks within class bodies. Static blocks provide a way to perform additional static initialization during class definition evaluation. This can be useful for a variety of tasks such as setting up resources, performing checks, or configuring implementations that are shared across all instances of a class.
Static Block Syntax Support
Enables parsing of static blocks within classes, allowing for static initialization code that runs when the class is defined.
class MyClass {
static {
// Initialization code
console.log('Static block in MyClass');
}
}
This package allows Babel to transform static class properties as well as properties declared with the property initializer syntax. It is similar in the sense that it enhances class capabilities, but it focuses on properties rather than static initialization blocks.
Enables parsing and transformation of private methods and accessors in classes. While it targets a different aspect of class syntax (privacy), it similarly extends the functionality of classes in modern JavaScript.
Allow parsing of class static blocks
See our website @babel/plugin-syntax-class-static-block for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-class-static-block
or using yarn:
yarn add @babel/plugin-syntax-class-static-block --dev
FAQs
Allow parsing of class static blocks
The npm package @babel/plugin-syntax-class-static-block receives a total of 19,214,298 weekly downloads. As such, @babel/plugin-syntax-class-static-block popularity was classified as popular.
We found that @babel/plugin-syntax-class-static-block demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
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.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.
Research
Security News
Socket researchers uncovered malicious npm and PyPI packages that steal crypto wallet credentials using Google Analytics and Telegram for exfiltration.
Product
Socket now supports .NET, bringing supply chain security and SBOM accuracy to NuGet and MSBuild-powered C# projects.