@rkmodules/rules 0.0.97 → 0.0.99
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 +30 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +27 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/DataTree/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -40,6 +40,10 @@ export declare function broadCast<T>(value: T | T[] | Tree<T>): Tree<T>;
|
|
|
40
40
|
export declare function getBranch<T>(tree: Tree<T>, path: string): T[] | void;
|
|
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;
|
|
44
|
+
export declare function forEachBranch<T>(tree: Tree<T>, fn: (branch: T[], path: string, index: number) => void): void;
|
|
45
|
+
export declare function forEachItem<T>(tree: Tree<T>, fn: (item: T, path: string, pathIndex: number, index: number) => void): void;
|
|
46
|
+
export declare function pushItem<T>(tree: Tree<T>, path: string, item: T): void;
|
|
43
47
|
/**
|
|
44
48
|
* 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
|
|
45
49
|
* @param tree
|