@rkmodules/rules 0.0.93 → 0.0.94

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
@@ -271,10 +271,10 @@ function mapTree(tree, fn) {
271
271
  });
272
272
  }
273
273
  function mapTreeBranch(tree, fn) {
274
- return nAryOnTreeBranch([tree], function mapTreeBranchCallback(_a, _b) {
274
+ return nAryOnTreeBranch([tree], function mapTreeBranchCallback(_a, _b, index) {
275
275
  var _c = __read(_a, 1), branch = _c[0];
276
276
  var _d = __read(_b, 1), path = _d[0];
277
- return fn(branch || [], path);
277
+ return fn(branch || [], path, index);
278
278
  });
279
279
  }
280
280
  /**
@@ -298,7 +298,7 @@ function nAryOnTreeBranch(trees, fn) {
298
298
  // get all the paths of which the trees are the longest, use the first
299
299
  var maxPaths = paths.filter(function (_, i) { return allKeys[i].length === maxBranches; });
300
300
  var path = maxPaths[0];
301
- var newBranch = fn(branches, paths);
301
+ var newBranch = fn(branches, paths, i);
302
302
  if (newBranch !== DISCARD) {
303
303
  result[path] = newBranch;
304
304
  }
@@ -364,10 +364,10 @@ function nAryOnTree(trees, fn, fill) {
364
364
  * @returns
365
365
  */
366
366
  function binaryOnTreeBranch(treeA, treeB, fn) {
367
- return nAryOnTreeBranch([treeA, treeB], function binaryOnTreeBranchCallback(_a, _b) {
367
+ return nAryOnTreeBranch([treeA, treeB], function binaryOnTreeBranchCallback(_a, _b, index) {
368
368
  var _c = __read(_a, 2), branchA = _c[0], branchB = _c[1];
369
369
  var _d = __read(_b, 2), pathA = _d[0], pathB = _d[1];
370
- return fn(branchA || [], branchB || [], pathA, pathB);
370
+ return fn(branchA || [], branchB || [], pathA, pathB, index);
371
371
  });
372
372
  }
373
373
  /**