node package manager

babel-plugin-transform-minify-booleans

babel-plugin-transform-minify-booleans

Turn boolean literals into !0 for true and !1 for false.

Installation

$ npm install babel-plugin-transform-minify-booleans

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-minify-booleans"]
}

Via CLI

$ babel --plugins transform-minify-booleans script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-minify-booleans"]
});