babel-plugin-transform-es2015-typeof-symbol
ES6 introduces a new native type called symbols. This transformer wraps all
typeof
expressions with a method that replicates native behaviour. (ie. returning "symbol" for symbols)
Example
In
typeof Symbol === "symbol";
Out
var { return obj && objconstructor === Symbol ? "symbol" : typeof obj;}; === "symbol";
Installation
npm install --save-dev babel-plugin-transform-es2015-typeof-symbol
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
babel --plugins transform-es2015-typeof-symbol script.js
Via Node API
;