babel-plugin-minify-infinity
In
JavaScript
Infinity;
Out
JavaScript
1 / 0;
Installation
- npm
- Yarn
- pnpm
npm install babel-plugin-minify-infinity --save-dev
yarn add babel-plugin-minify-infinity --dev
pnpm add babel-plugin-minify-infinity --save-dev
Usage
With a configuration file (Recommended)
babel.config.json
{
"plugins": ["minify-infinity"]
}
Via CLI
Shell
babel --plugins minify-infinity script.js
Via Node API
JavaScript
require("@babel/core").transformSync("code", {
plugins: ["minify-infinity"]
});