Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-typeof-symbol

Package Overview
Dependencies
0
Maintainers
6
Versions
74
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-beta.38 to 7.0.0-beta.39

6

lib/index.js

@@ -47,7 +47,5 @@ "use strict";

if (arg.isIdentifier() && !path.scope.hasBinding(arg.node.name)) {
var undefLiteral = _core.types.stringLiteral("undefined");
var unary = _core.types.unaryExpression("typeof", _core.types.cloneNode(node.argument));
var unary = _core.types.unaryExpression("typeof", node.argument);
path.replaceWith(_core.types.conditionalExpression(_core.types.binaryExpression("===", unary, undefLiteral), undefLiteral, call));
path.replaceWith(_core.types.conditionalExpression(_core.types.binaryExpression("===", unary, _core.types.stringLiteral("undefined")), _core.types.stringLiteral("undefined"), call));
} else {

@@ -54,0 +52,0 @@ path.replaceWith(call);

{
"name": "@babel/plugin-transform-typeof-symbol",
"version": "7.0.0-beta.38",
"version": "7.0.0-beta.39",
"description": "This transformer wraps all typeof expressions with a method that replicates native behaviour. (ie. returning “symbol” for symbols)",

@@ -12,8 +12,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-typeof-symbol",

"peerDependencies": {
"@babel/core": "7.0.0-beta.38"
"@babel/core": "7.0.0-beta.39"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.38",
"@babel/helper-plugin-test-runner": "7.0.0-beta.38"
"@babel/core": "7.0.0-beta.39",
"@babel/helper-plugin-test-runner": "7.0.0-beta.39"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc