Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
61
Maintainers
4
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

This plugin transforms checks for a private property in an object


Version published
Weekly downloads
23M
increased by2.92%
Maintainers
4
Install size
8.06 MB
Created
Weekly downloads
 

Package description

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

The @babel/plugin-proposal-private-property-in-object package is a Babel plugin that allows developers to use the `#private in object` syntax to check for the existence of a private property within an object. This is part of a proposal for ECMAScript and is not yet part of the official language specification. The plugin transforms this syntax into a form that can be understood by current JavaScript engines.

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

Private property existence checks

This feature allows developers to check if a private field exists in an instance of a class. The code sample demonstrates how to define a private field and then check for its existence using the `in` operator.

class MyClass {
  #myPrivateField;

  hasPrivateField(obj) {
    return #myPrivateField in obj;
  }
}

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

Readme

Source

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

This plugin transforms checks for a private property in an object

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

Install

Using npm:

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

or using yarn:

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

Keywords

FAQs

Last updated on 05 Jun 2023

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