Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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

Package Overview
Dependencies
Maintainers
6
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 7.16.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19M
decreased by-17.71%
Maintainers
6
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 31 Dec 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc