Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@babel/plugin-syntax-class-properties
Advanced tools
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.
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';
}
This package not only allows Babel to parse class properties but also transforms them so they can run in environments that do not support this feature natively. It is more comprehensive compared to @babel/plugin-syntax-class-properties, which only enables parsing.
While not exclusively focused on class properties, this Babel preset includes capabilities to transform class properties based on the target environment. It is a broader tool that configures Babel plugins and polyfills according to the target browsers or runtime environments.
Allow parsing of class properties
See our website @babel/plugin-syntax-class-properties for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-class-properties
or using yarn:
yarn add @babel/plugin-syntax-class-properties --dev
FAQs
Allow parsing of class properties
The npm package @babel/plugin-syntax-class-properties receives a total of 20,894,345 weekly downloads. As such, @babel/plugin-syntax-class-properties popularity was classified as popular.
We found that @babel/plugin-syntax-class-properties 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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.