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

@babel/plugin-transform-typeof-symbol

Package Overview
Dependencies
Maintainers
4
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-typeof-symbol

This transformer wraps all typeof expressions with a method that replicates native behaviour. (ie. returning “symbol” for symbols)

  • 8.0.0-alpha.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24M
increased by1.23%
Maintainers
4
Weekly downloads
 
Created

What is @babel/plugin-transform-typeof-symbol?

The @babel/plugin-transform-typeof-symbol package is a plugin for Babel, a JavaScript compiler, that ensures the behavior of the 'typeof' operator is spec-compliant when used with symbols. In environments that do not fully support symbols, this plugin transforms 'typeof' checks to a method that can correctly identify 'symbol' types.

What are @babel/plugin-transform-typeof-symbol's main functionalities?

Transform typeof checks for symbols

This code represents the transformation that the plugin applies to 'typeof' checks. It defines a function that can correctly identify symbols, even in environments that do not natively support the 'symbol' type.

var _typeof = function(obj) { return obj && typeof Symbol !== 'undefined' && obj.constructor === Symbol ? 'symbol' : typeof obj; };

Other packages similar to @babel/plugin-transform-typeof-symbol

Keywords

FAQs

Package last updated on 26 Jan 2024

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