Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@babel/plugin-syntax-private-property-in-object
Advanced tools
Package description
The @babel/plugin-syntax-private-property-in-object npm package allows Babel to parse syntax that uses private properties in objects. This is particularly useful for developers working with the latest JavaScript features, enabling them to write modern code that includes private class fields accessed within objects. It's important to note that this plugin only allows Babel to parse this syntax; it doesn't provide the implementation for how private properties work at runtime.
Parsing private property in object syntax
This feature enables Babel to understand and parse code that checks for the existence of a private property within an object. The code sample demonstrates a class that includes a private property and a method to check if a private property exists within a given object using the 'in' operator.
{ class MyClass { #myPrivateProperty = 'secret'; checkPrivate(obj) { return #myPrivateProperty in obj; } } }
This package allows Babel to parse and transform private instance methods and accessors in classes. While @babel/plugin-syntax-private-property-in-object focuses on the syntax for private properties in objects, @babel/plugin-proposal-private-methods extends this functionality to include methods and accessors, providing a broader scope of encapsulation features.
Enables Babel to parse and transform public and private class properties. This package is broader than @babel/plugin-syntax-private-property-in-object as it includes support for both public and private class fields, allowing developers to define class properties more succinctly and with clear encapsulation.
Readme
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 '#foo in obj' brand checks
The npm package @babel/plugin-syntax-private-property-in-object receives a total of 12,891,195 weekly downloads. As such, @babel/plugin-syntax-private-property-in-object popularity was classified as popular.
We found that @babel/plugin-syntax-private-property-in-object 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.