@putout/compare
Advanced tools
Comparing version 5.2.0 to 5.2.1
{ | ||
"name": "@putout/compare", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -39,3 +39,3 @@ "description": "compare ast-nodes", | ||
"jessy": "^3.0.0", | ||
"nessy": "^3.0.0" | ||
"nessy": "^4.0.0" | ||
}, | ||
@@ -54,3 +54,3 @@ "keywords": [ | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-putout": "^5.0.1", | ||
"eslint-plugin-putout": "^6.0.0", | ||
"just-camel-case": "^4.0.2", | ||
@@ -57,0 +57,0 @@ "lerna": "^3.8.5", |
@@ -1,9 +0,11 @@ | ||
# putout-compare [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] | ||
# @putout/compare [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] | ||
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/compare.svg?style=flat&longCache=true | ||
[NPMURL]: https://npmjs.org/package/@putout/compare"npm" | ||
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/compare.svg?style=flat&longCache=true | ||
[DependencyStatusURL]: https://david-dm.org/coderaiser/putout?path=packages/compare | ||
[DependencyStatusIMGURL]: https://david-dm.org/coderaiser/putout.svg?path=packages/compare | ||
[NPMURL]: https://npmjs.org/package/@putout/compare"npm" | ||
[DependencyStatusURL]: https://david-dm.org/coderaiser/putout?path=packages/compare | ||
[DependencyStatusIMGURL]: https://david-dm.org/coderaiser/putout.svg?path=packages/compare | ||
Compare AST-nodes. | ||
@@ -31,8 +33,8 @@ | ||
// returns | ||
{ | ||
({ | ||
__array: { | ||
type: 'ArrayPattern', | ||
...etc | ||
} | ||
} | ||
//...etc | ||
}, | ||
}); | ||
``` | ||
@@ -47,3 +49,3 @@ | ||
##### __ | ||
##### \__ | ||
@@ -57,6 +59,6 @@ Any node. | ||
// returns | ||
true | ||
true; | ||
``` | ||
##### __object | ||
##### \__object | ||
@@ -66,9 +68,9 @@ `ObjectPattern` or `ObjectExpression` with any count of `properties`. | ||
```js | ||
compare('const {} = data', 'const __object = __') | ||
compare('const {hello} = data', 'const __object = __') | ||
compare('const {} = data', 'const __object = __'); | ||
compare('const {hello} = data', 'const __object = __'); | ||
// returns | ||
true | ||
true; | ||
``` | ||
##### __array | ||
##### \__array | ||
@@ -82,6 +84,6 @@ `ArrayPattern` or `ArrayExpression` with any count of `elements`. | ||
// returns | ||
true | ||
true; | ||
``` | ||
##### __args, __args_a | ||
##### \__args, \__args_a | ||
@@ -95,6 +97,6 @@ Any count of `arguments`: | ||
// returns | ||
true | ||
true; | ||
``` | ||
##### __imports | ||
##### \__imports | ||
@@ -107,3 +109,4 @@ Any count of `imports`: | ||
##### "__" | ||
##### "\__" | ||
Any string literal. | ||
@@ -115,3 +118,4 @@ | ||
##### __a | ||
##### \__a | ||
Linked literal | ||
@@ -123,3 +127,4 @@ | ||
##### "__a" | ||
##### "\__a" | ||
Linked string literal. | ||
@@ -132,2 +137,3 @@ | ||
##### `__a` | ||
Linked template literal. | ||
@@ -138,6 +144,7 @@ | ||
// returns | ||
true | ||
true; | ||
``` | ||
##### __body | ||
##### \__body | ||
Any `BlockStatement`. | ||
@@ -148,29 +155,31 @@ | ||
// returns | ||
false | ||
false; | ||
compare('const a = () => {}', 'const a = () => __body'); | ||
// returns | ||
true | ||
true; | ||
``` | ||
##### __nop | ||
##### \__nop | ||
Any `Function` with no `arguments` and empty body; | ||
```js | ||
compare('const a = () => {}', 'const __a = __nop); | ||
compare('const a = () => {}', 'const __a = __nop'); | ||
// returns | ||
true | ||
true; | ||
compare('const a = async () => {}', 'const a = __nop'); | ||
// returns | ||
true | ||
true; | ||
``` | ||
##### __identifier | ||
Any `Identifier | ||
##### \__identifier | ||
Any \`Identifier | ||
```js | ||
compare('const a = 5', 'const __identifier = 5'); | ||
// returns | ||
true | ||
true; | ||
``` | ||
@@ -181,2 +190,1 @@ | ||
MIT | ||
19941
178
+ Addednessy@4.0.0(transitive)
- Removednessy@3.0.2(transitive)
Updatednessy@^4.0.0