Socket
Socket
Sign inDemoInstall

babel-plugin-transform-es2015-typeof-symbol

Package Overview
Dependencies
1
Maintainers
6
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.18.0 to 6.22.0

4

lib/index.js

@@ -26,4 +26,4 @@ "use strict";

UnaryExpression: function UnaryExpression(path) {
var node = path.node;
var parent = path.parent;
var node = path.node,
parent = path.parent;

@@ -30,0 +30,0 @@ if (node[IGNORE]) return;

{
"name": "babel-plugin-transform-es2015-typeof-symbol",
"version": "6.18.0",
"version": "6.22.0",
"description": "This transformer wraps all typeof expressions with a method that replicates native behaviour. (ie. returning “symbol” for symbols)",

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

"dependencies": {
"babel-runtime": "^6.0.0"
"babel-runtime": "^6.22.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "^6.18.0"
"babel-helper-plugin-test-runner": "^6.22.0"
}
}
# babel-plugin-transform-es2015-typeof-symbol
> ES6 introduces a new native type called [symbols](https://babeljs.io/learn-es2015/#ecmascript-2015-features-symbols). This transformer wraps all `typeof` expressions with a method that replicates native behaviour. (ie. returning "symbol" for symbols)
## Example
**In**
```javascript
typeof Symbol() === "symbol";
```
**Out**
```javascript
var _typeof = function (obj) {
return obj && obj.constructor === Symbol ? "symbol" : typeof obj;
};
_typeof(Symbol()) === "symbol";
```
## Installation
```sh
$ npm install babel-plugin-transform-es2015-typeof-symbol
npm install --save-dev babel-plugin-transform-es2015-typeof-symbol
```

@@ -24,3 +44,3 @@

```sh
$ babel --plugins transform-es2015-typeof-symbol script.js
babel --plugins transform-es2015-typeof-symbol script.js
```

@@ -27,0 +47,0 @@

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