This transformer wraps all typeof expressions with a method that replicates native behaviour. (ie. returning “symbol” for symbols)
``sh`
$ npm install babel-plugin-transform-es2015-typeof-symbol
.babelrc
`json`
{
"plugins": ["transform-es2015-typeof-symbol"]
}
`sh`
$ babel --plugins transform-es2015-typeof-symbol script.js
`javascript``
require("babel-core").transform("code", {
plugins: ["transform-es2015-typeof-symbol"]
});