@bbn/bbn 1.0.135 → 1.0.137
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/fn/misc/analyzeFunction.js +6 -1
- package/dist/index.js +6 -1
- package/package.json +1 -1
|
@@ -108,7 +108,10 @@ var analyzeFunction = function (fn) {
|
|
|
108
108
|
settingDefault = true;
|
|
109
109
|
}
|
|
110
110
|
else if (all[i] === ",") {
|
|
111
|
-
if (
|
|
111
|
+
if (isDestructuring) {
|
|
112
|
+
exp += all[i];
|
|
113
|
+
}
|
|
114
|
+
else if (parOpened > parClosed) {
|
|
112
115
|
if (settingDefault) {
|
|
113
116
|
currentArg["default"] = exp.trim();
|
|
114
117
|
settingDefault = false;
|
|
@@ -135,9 +138,11 @@ var analyzeFunction = function (fn) {
|
|
|
135
138
|
if (parOpened > parClosed) {
|
|
136
139
|
if (all[i] === "{" && !isDestructuring) {
|
|
137
140
|
isDestructuring = true;
|
|
141
|
+
exp = all[i];
|
|
138
142
|
}
|
|
139
143
|
else if (all[i] === "}" && isDestructuring) {
|
|
140
144
|
isDestructuring = false;
|
|
145
|
+
exp += all[i];
|
|
141
146
|
}
|
|
142
147
|
}
|
|
143
148
|
else {
|
package/dist/index.js
CHANGED
|
@@ -3425,7 +3425,10 @@
|
|
|
3425
3425
|
settingDefault = true;
|
|
3426
3426
|
}
|
|
3427
3427
|
else if (all[i] === ",") {
|
|
3428
|
-
if (
|
|
3428
|
+
if (isDestructuring) {
|
|
3429
|
+
exp += all[i];
|
|
3430
|
+
}
|
|
3431
|
+
else if (parOpened > parClosed) {
|
|
3429
3432
|
if (settingDefault) {
|
|
3430
3433
|
currentArg["default"] = exp.trim();
|
|
3431
3434
|
settingDefault = false;
|
|
@@ -3452,9 +3455,11 @@
|
|
|
3452
3455
|
if (parOpened > parClosed) {
|
|
3453
3456
|
if (all[i] === "{" && !isDestructuring) {
|
|
3454
3457
|
isDestructuring = true;
|
|
3458
|
+
exp = all[i];
|
|
3455
3459
|
}
|
|
3456
3460
|
else if (all[i] === "}" && isDestructuring) {
|
|
3457
3461
|
isDestructuring = false;
|
|
3462
|
+
exp += all[i];
|
|
3458
3463
|
}
|
|
3459
3464
|
}
|
|
3460
3465
|
else {
|