@rkmodules/rules 0.0.101 → 0.0.103

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.
@@ -37,10 +37,20 @@ export declare function isSingleTon(value: Tree<any>): boolean;
37
37
  * - a tree is returned as is
38
38
  */
39
39
  export declare function broadCast<T>(value: T | T[] | Tree<T>): Tree<T>;
40
- export declare function getBranch<T>(tree: Tree<T>, path: string): T[] | void;
40
+ export declare function getBranch<T>(tree: Tree<T>, path: string): T[] | undefined;
41
41
  export declare function getBranches<T>(tree: Tree<T>): T[][];
42
42
  export declare function getPaths<T>(tree: Tree<T>): string[];
43
- export declare function getItem<T>(tree: Tree<T>, path: string, index: number): T | void;
43
+ export declare function getItem<T>(tree: Tree<T>, path: string, index: number): T | undefined;
44
+ /**
45
+ * gets number of dimensions (max depth of the tree) and their sizes (group sizes at each level)
46
+ * @param tree
47
+ * @returns
48
+ */
49
+ export declare function treeStats(tree: Tree<any>): {
50
+ dimensions: number;
51
+ branchSizes: {};
52
+ };
53
+ export declare function normalizePaths<T>(tree: Tree<T>): Tree<T>;
44
54
  export declare function forEachBranch<T>(tree: Tree<T>, fn: (branch: T[], path: string, index: number) => void): void;
45
55
  export declare function forEachItem<T>(tree: Tree<T>, fn: (item: T, path: string, pathIndex: number, index: number) => void): void;
46
56
  export declare function pushItem<T>(tree: Tree<T>, path: string, item: T): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkmodules/rules",
3
- "version": "0.0.101",
3
+ "version": "0.0.103",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",