@rkmodules/rules 0.0.179 → 0.0.180
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
|
@@ -1967,15 +1967,23 @@ var listLength = {
|
|
|
1967
1967
|
inputs: {
|
|
1968
1968
|
list: "any",
|
|
1969
1969
|
},
|
|
1970
|
+
params: {
|
|
1971
|
+
merge: "boolean",
|
|
1972
|
+
},
|
|
1970
1973
|
outputs: {
|
|
1971
1974
|
length: "number",
|
|
1972
1975
|
},
|
|
1973
|
-
impl: function (inputs) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1976
|
+
impl: function (inputs, params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1977
|
+
var length;
|
|
1974
1978
|
return __generator(this, function (_a) {
|
|
1979
|
+
length = mapTreeBranch(inputs.list || {}, function (branch) {
|
|
1980
|
+
return [branch.length];
|
|
1981
|
+
});
|
|
1982
|
+
if (params.merge) {
|
|
1983
|
+
length = trimTree(length, 1);
|
|
1984
|
+
}
|
|
1975
1985
|
return [2 /*return*/, {
|
|
1976
|
-
length:
|
|
1977
|
-
return [branch.length];
|
|
1978
|
-
}),
|
|
1986
|
+
length: length,
|
|
1979
1987
|
}];
|
|
1980
1988
|
});
|
|
1981
1989
|
}); },
|
|
@@ -3870,7 +3878,10 @@ var Engine = /** @class */ (function () {
|
|
|
3870
3878
|
// register the primitive
|
|
3871
3879
|
this.fnIndex[primitive.name] = primitive;
|
|
3872
3880
|
this.graphDefinitions.set(primitive, node);
|
|
3873
|
-
this.fireEvent("functionBuilt", {
|
|
3881
|
+
this.fireEvent("functionBuilt", {
|
|
3882
|
+
name: primitive.name,
|
|
3883
|
+
fn: primitive,
|
|
3884
|
+
});
|
|
3874
3885
|
return primitive;
|
|
3875
3886
|
};
|
|
3876
3887
|
Engine.prototype.mount = function (node, inputs, options) {
|