@rkmodules/rules 0.0.150 → 0.0.152
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.cjs.js
CHANGED
|
@@ -711,6 +711,9 @@ var getValue = {
|
|
|
711
711
|
tree: "any",
|
|
712
712
|
path: "string",
|
|
713
713
|
},
|
|
714
|
+
params: {
|
|
715
|
+
removeEmpty: { type: "boolean", default: false, label: "remove empty" },
|
|
716
|
+
},
|
|
714
717
|
outputs: {
|
|
715
718
|
tree: "any",
|
|
716
719
|
},
|
|
@@ -719,7 +722,11 @@ var getValue = {
|
|
|
719
722
|
var _c = _b.tree, tree = _c === void 0 ? {} : _c, _d = _b.path, path = _d === void 0 ? {} : _d;
|
|
720
723
|
return __generator(this, function (_e) {
|
|
721
724
|
result = binaryOnTree(tree, path, function (value, path) {
|
|
722
|
-
|
|
725
|
+
var val = getValue$1(value, path);
|
|
726
|
+
if ((val === undefined || val === null) && params.removeEmpty) {
|
|
727
|
+
return DISCARD;
|
|
728
|
+
}
|
|
729
|
+
return val;
|
|
723
730
|
}, true);
|
|
724
731
|
return [2 /*return*/, { tree: result }];
|
|
725
732
|
});
|
|
@@ -1548,7 +1555,7 @@ var filterList = {
|
|
|
1548
1555
|
keep: "boolean",
|
|
1549
1556
|
},
|
|
1550
1557
|
params: {
|
|
1551
|
-
removeEmpty: { type: "boolean", default: false },
|
|
1558
|
+
removeEmpty: { type: "boolean", default: false, label: "remove empty" },
|
|
1552
1559
|
},
|
|
1553
1560
|
outputs: {
|
|
1554
1561
|
list: "any",
|
|
@@ -8487,6 +8494,11 @@ exports.Flow = Flow;
|
|
|
8487
8494
|
exports.FlowContext = FlowContext;
|
|
8488
8495
|
exports.GenericNode = GenericNode;
|
|
8489
8496
|
exports.Input = Input;
|
|
8497
|
+
exports.InputBoolean = InputBoolean;
|
|
8498
|
+
exports.InputNumber = InputNumber;
|
|
8499
|
+
exports.InputSelect = InputSelect;
|
|
8500
|
+
exports.InputString = InputString;
|
|
8501
|
+
exports.InputText = InputText;
|
|
8490
8502
|
exports.Lib = Lib;
|
|
8491
8503
|
exports.Output = Output;
|
|
8492
8504
|
exports.Param = Param;
|