mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-04 04:40:05 +02:00
add some packages
This commit is contained in:
49
node_modules/babel-plugin-transform-simplify-comparison-operators/README.md
generated
vendored
Normal file
49
node_modules/babel-plugin-transform-simplify-comparison-operators/README.md
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
# babel-plugin-transform-simplify-comparison-operators
|
||||
|
||||
Convert `===` and `!==` to `==` and `!=` if their types are inferred to be the same.
|
||||
|
||||
## Example
|
||||
|
||||
**In**
|
||||
|
||||
```javascript
|
||||
typeof foo === "object";
|
||||
```
|
||||
|
||||
**Out**
|
||||
|
||||
```javascript
|
||||
typeof foo == "object";
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install babel-plugin-transform-simplify-comparison-operators
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Via `.babelrc` (Recommended)
|
||||
|
||||
**.babelrc**
|
||||
|
||||
```json
|
||||
{
|
||||
"plugins": ["transform-simplify-comparison-operators"]
|
||||
}
|
||||
```
|
||||
|
||||
### Via CLI
|
||||
|
||||
```sh
|
||||
babel --plugins transform-simplify-comparison-operators script.js
|
||||
```
|
||||
|
||||
### Via Node API
|
||||
|
||||
```javascript
|
||||
require("@babel/core").transform("code", {
|
||||
plugins: ["transform-simplify-comparison-operators"]
|
||||
});
|
||||
```
|
Reference in New Issue
Block a user