@putout/plugin-for-of 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,6 @@ const {
|
|
|
8
8
|
const {
|
|
9
9
|
isIdentifier,
|
|
10
10
|
isObjectProperty,
|
|
11
|
-
isObjectPattern,
|
|
12
11
|
} = types;
|
|
13
12
|
|
|
14
13
|
const {remove} = operator;
|
|
@@ -101,17 +100,6 @@ function isAllReferenced(path, nodes) {
|
|
|
101
100
|
|
|
102
101
|
continue;
|
|
103
102
|
}
|
|
104
|
-
|
|
105
|
-
if (isObjectPattern(node)) {
|
|
106
|
-
for (const {key} of node.properties) {
|
|
107
|
-
const current = bindings[key.name];
|
|
108
|
-
|
|
109
|
-
if (!current.referenced)
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
continue;
|
|
114
|
-
}
|
|
115
103
|
}
|
|
116
104
|
|
|
117
105
|
return true;
|
|
@@ -132,6 +120,7 @@ function getElements({node}) {
|
|
|
132
120
|
function getPathElements(path) {
|
|
133
121
|
if (path.isObjectPattern())
|
|
134
122
|
return path.get('properties');
|
|
123
|
+
|
|
135
124
|
return path.get('elements');
|
|
136
125
|
}
|
|
137
126
|
|
package/package.json
CHANGED