mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-02-10 07:58:52 +00:00
48 lines
476 B
Markdown
48 lines
476 B
Markdown
# babel-plugin-minify-infinity
|
|
|
|
## Example
|
|
|
|
**In**
|
|
|
|
```javascript
|
|
Infinity;
|
|
```
|
|
|
|
**Out**
|
|
|
|
```javascript
|
|
1 / 0;
|
|
```
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
$ npm install babel-plugin-minify-infinity
|
|
```
|
|
|
|
## Usage
|
|
|
|
### Via `.babelrc` (Recommended)
|
|
|
|
**.babelrc**
|
|
|
|
```json
|
|
{
|
|
"plugins": ["minify-infinity"]
|
|
}
|
|
```
|
|
|
|
### Via CLI
|
|
|
|
```sh
|
|
$ babel --plugins minify-infinity script.js
|
|
```
|
|
|
|
### Via Node API
|
|
|
|
```javascript
|
|
require("babel-core").transform("code", {
|
|
plugins: ["minify-infinity"]
|
|
});
|
|
```
|