@putout/compare
Advanced tools
Comparing version 4.6.0 to 4.6.1
@@ -194,3 +194,3 @@ 'use strict'; | ||
if (isId(value, nodeValue)) | ||
if (isId(nodeValue, value)) | ||
return true; | ||
@@ -210,3 +210,3 @@ | ||
if (isLinkedNode(value) || isLinkedArgs(value) || isLinkedId(value, nodeValue)) { | ||
if (isLinkedNode(value) || isLinkedArgs(value) || isLinkedId(nodeValue, value)) { | ||
const name = parseName(value); | ||
@@ -237,3 +237,3 @@ | ||
if (isArrays(value, nodeValue)) { | ||
if (isArrays(nodeValue, value)) { | ||
add(nodeValue, value); | ||
@@ -240,0 +240,0 @@ return true; |
@@ -82,6 +82,6 @@ 'use strict'; | ||
const isId = (a, b) => { | ||
if (!isIdentifier(a, {name: ID})) | ||
if (!isIdentifier(b, {name: ID})) | ||
return false; | ||
return isIdentifier(b); | ||
return isIdentifier(a); | ||
}; | ||
@@ -111,6 +111,6 @@ | ||
module.exports.isLinkedId = (a, b) => { | ||
if (!isIdentifier(a) || !LINKED_ID.test(a.name)) | ||
if (!isIdentifier(b) || !LINKED_ID.test(b.name)) | ||
return false; | ||
return isIdentifier(b); | ||
return isIdentifier(a); | ||
}; | ||
@@ -117,0 +117,0 @@ |
{ | ||
"name": "@putout/compare", | ||
"version": "4.6.0", | ||
"version": "4.6.1", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "compare ast-nodes", |