@rkmodules/rules 0.0.97 → 0.0.98

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.esm.js CHANGED
@@ -261,6 +261,20 @@ function getBranches(tree) {
261
261
  function getPaths(tree) {
262
262
  return Object.keys(tree);
263
263
  }
264
+ function forEachBranch(tree, fn) {
265
+ var paths = getPaths(tree);
266
+ paths.forEach(function (path, i) {
267
+ var branch = tree[path];
268
+ fn(branch, path, i);
269
+ });
270
+ }
271
+ function forEachItem(tree, fn) {
272
+ forEachBranch(tree, function (branch, path, pathIndex) {
273
+ branch.forEach(function (item, i) {
274
+ fn(item, path, pathIndex, i);
275
+ });
276
+ });
277
+ }
264
278
  /**
265
279
  * maps a tree, the tree branches are flatmapped, so if an array is returned for each item in the list, a flat list is returned
266
280
  * @param tree
@@ -7244,5 +7258,5 @@ function DDContext(_a) {
7244
7258
  return React.createElement(DndProvider, { backend: HTML5Backend }, children);
7245
7259
  }
7246
7260
 
7247
- export { DDContext, DISCARD, Engine, Flow, Lib, binaryOnTree, binaryOnTreeBranch, broadCast, expandTree, getBranch, getBranches, getPaths, getPositions, getReferences, getValue$1 as getValue, getVariable, graftTree, hasReference, interpolate, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizeVarDef, parseReference, primitives, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, trimTree, uid$1 as uid, useDraggableNode, useFlow, useFunction, usePositions, useUpdatePositions, useVariable, variableStore };
7261
+ export { DDContext, DISCARD, Engine, Flow, Lib, binaryOnTree, binaryOnTreeBranch, broadCast, expandTree, forEachBranch, forEachItem, getBranch, getBranches, getPaths, getPositions, getReferences, getValue$1 as getValue, getVariable, graftTree, hasReference, interpolate, isReference, isSingleTon, isTree, mapTree, mapTreeBranch, nAryOnTree, nAryOnTreeBranch, normalizeVarDef, parseReference, primitives, sameShape, simplifyTree$1 as simplifyTree, toArray, topSort, treeSize, trimTree, uid$1 as uid, useDraggableNode, useFlow, useFunction, usePositions, useUpdatePositions, useVariable, variableStore };
7248
7262
  //# sourceMappingURL=index.esm.js.map