babel-plugin-transform-simplify-comparison-operators

Example

In

  1. typeof foo === "object";

Out

  1. typeof foo == "object";

Installation

  1. npm install babel-plugin-transform-simplify-comparison-operators --save-dev

Usage

  1. {
  2. "plugins": ["transform-simplify-comparison-operators"]
  3. }

Via CLI

  1. babel --plugins transform-simplify-comparison-operators script.js

Via Node API

  1. require("@babel/core").transform("code", {
  2. plugins: ["transform-simplify-comparison-operators"]
  3. });