@oddo/lang 0.0.4 → 0.0.6
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.
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4165,6 +4165,15 @@ function collectOddoIdentifiers(node, names = /* @__PURE__ */ new Set()) {
|
|
|
4165
4165
|
currentScope = parentScope;
|
|
4166
4166
|
return names;
|
|
4167
4167
|
}
|
|
4168
|
+
if (node.type === "property") {
|
|
4169
|
+
if (node.computed && node.key) {
|
|
4170
|
+
collectOddoIdentifiers(node.key, names);
|
|
4171
|
+
}
|
|
4172
|
+
if (node.value) {
|
|
4173
|
+
collectOddoIdentifiers(node.value, names);
|
|
4174
|
+
}
|
|
4175
|
+
return names;
|
|
4176
|
+
}
|
|
4168
4177
|
for (const key of Object.keys(node)) {
|
|
4169
4178
|
if (key === "type") continue;
|
|
4170
4179
|
const val = node[key];
|
|
@@ -4549,6 +4558,15 @@ function collectOddoIdentifiersOnly(node, names = /* @__PURE__ */ new Set()) {
|
|
|
4549
4558
|
if (node.type === "identifier") {
|
|
4550
4559
|
names.add(node.name);
|
|
4551
4560
|
}
|
|
4561
|
+
if (node.type === "property") {
|
|
4562
|
+
if (node.computed && node.key) {
|
|
4563
|
+
collectOddoIdentifiersOnly(node.key, names);
|
|
4564
|
+
}
|
|
4565
|
+
if (node.value) {
|
|
4566
|
+
collectOddoIdentifiersOnly(node.value, names);
|
|
4567
|
+
}
|
|
4568
|
+
return Array.from(names);
|
|
4569
|
+
}
|
|
4552
4570
|
for (const key of Object.keys(node)) {
|
|
4553
4571
|
if (key === "type") continue;
|
|
4554
4572
|
const val = node[key];
|