babel-plugin-transform-lhs-constants
v1.4.0
Published
The Babel plugin to move constant values to the left-hand side of binary nodes
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 fooInstall
Using npm:
npm i -D babel-plugin-transform-lhs-constantsor using yarn:
yarn add babel-plugin-transform-lhs-constants -DUsage
With a configuration file babel.config.json
{
"plugins": ["babel-plugin-transform-lhs-constants"]
}