Socket
Socket
Sign inDemoInstall

@babel/plugin-syntax-private-property-in-object

Package Overview
Dependencies
54
Maintainers
6
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-syntax-private-property-in-object

Allow parsing of '#foo in obj' brand checks


Version published
Maintainers
6
Weekly downloads
14,008,934
decreased by-24.96%

Weekly downloads

Package description

What is @babel/plugin-syntax-private-property-in-object?

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.

What are @babel/plugin-syntax-private-property-in-object's main functionalities?

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; } } }

Other packages similar to @babel/plugin-syntax-private-property-in-object

Readme

Source

@babel/plugin-syntax-private-property-in-object

Allow parsing of '#foo in obj' brand checks

See our website @babel/plugin-syntax-private-property-in-object for more information.

Install

Using npm:

npm install --save-dev @babel/plugin-syntax-private-property-in-object

or using yarn:

yarn add @babel/plugin-syntax-private-property-in-object --dev

Keywords

FAQs

Last updated on 09 Jun 2021

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