You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-typeof-symbol

Package Overview
Dependencies
Maintainers
4
Versions
76
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)


Version published
Weekly downloads
18M
decreased by-19.72%
Maintainers
4
Created
Weekly downloads
 

Package description

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

Changelog

Source

v7.24.8 (2024-07-11)

:eyeglasses: Spec Compliance
  • babel-parser
    • #16567 Do not use strict mode in TS declare (@liuxingbaoyu)
:bug: Bug Fix
:nail_care: Polish

Readme

Source

@babel/plugin-transform-typeof-symbol

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

See our website @babel/plugin-transform-typeof-symbol for more information.

Install

Using npm:

npm install --save-dev @babel/plugin-transform-typeof-symbol

or using yarn:

yarn add @babel/plugin-transform-typeof-symbol --dev

Keywords

FAQs

Package last updated on 11 Jul 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc