babel-plugin-transform-lhs-constants
v1.2.0
Published
The Babel plugin to move constant values to the left-hand side of binary nodes
Downloads
49
Readme
babel-plugin-transform-lhs-constants
The Babel plugin to move constant values to the left-hand side of binary nodes.
Example
- typeof foo === "string"
+ "string" === typeof foo
Install
Using npm:
npm i -D babel-plugin-transform-lhs-constants
or using yarn:
yarn add babel-plugin-transform-lhs-constants -D
Usage
With a configuration file babel.config.json
{
"plugins": ["babel-plugin-transform-lhs-constants"]
}