@putout/operate
Advanced tools
Comparing version 10.3.0 to 11.0.0
@@ -8,3 +8,7 @@ 'use strict'; | ||
const {key, value} = node; | ||
const equal = key.name === value.name; | ||
if (!equal) | ||
return; | ||
if (key.name !== from) | ||
@@ -14,6 +18,5 @@ return; | ||
key.name = to; | ||
value.name = to; | ||
node.shorthand = true; | ||
if (key.name === value.name) | ||
node.shorthand = true; | ||
path.stop(); | ||
@@ -20,0 +23,0 @@ }, |
@@ -12,6 +12,6 @@ 'use strict'; | ||
const bindingPath = bindings[from].path; | ||
const bindingPath = bindingCurrent.path; | ||
renameProperty(bindingPath, from, to); | ||
bindingPath.scope.rename(from, to); | ||
renameProperty(bindingPath, from, to); | ||
}; |
{ | ||
"name": "@putout/operate", | ||
"version": "10.3.0", | ||
"version": "11.0.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", |
22070
446