This transformer wraps all typeof expressions with a method that replicates native behaviour. (ie. returning “symbol” for symbols)
Package: babel-plugin-transform-es2015-typeof-symbol
Created by: babel
Last modified: Mon, 13 Jun 2022 04:04:27 GMT
Version: 6.23.0
License: MIT
Downloads: 5,786,672
Repository: https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-typeof-symbol
Install
npm install babel-plugin-transform-es2015-typeof-symbol
yarn add babel-plugin-transform-es2015-typeof-symbol
babel-plugin-transform-es2015-typeof-symbol
Installation
$ npm install babel-plugin-transform-es2015-typeof-symbol
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["transform-es2015-typeof-symbol"]
}
Via CLI
$ babel --plugins transform-es2015-typeof-symbol script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["transform-es2015-typeof-symbol"]
});