@rkmodules/rules 0.0.61 → 0.0.62

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.
@@ -32,6 +32,9 @@ export declare function isTree(value: any): value is Tree<any>;
32
32
  export declare function isSingleTon(value: Tree<any>): boolean;
33
33
  /**
34
34
  * turns a value or array of values into a tree
35
+ * - a single value becomes a tree with one branch "0" and one item
36
+ * - an array of values becomes a tree with one branch "0" and the items in the array
37
+ * - a tree is returned as is
35
38
  */
36
39
  export declare function broadCast<T>(value: T | T[] | Tree<T>): Tree<T>;
37
40
  export declare function getBranch<T>(tree: Tree<T>, path: string): T[] | void;
@@ -21,7 +21,7 @@ export declare function joinPath(a: Path, b: Path): string;
21
21
  * @param b
22
22
  * @returns
23
23
  */
24
- export declare function mergeTrees<T>(a: Tree<T>, b: Tree<T>): Tree<T>;
24
+ export declare function mergeTrees<T>(...others: Tree<T>[]): Tree<T>;
25
25
  /**
26
26
  * prefixes all paths in the tree with the given prefix
27
27
  * @param t
@@ -1,6 +1,7 @@
1
1
  import { Tree } from "../DataTree";
2
2
  import { VarRef } from "./types";
3
3
  export declare function isReference(value: any): value is string;
4
+ export declare function hasReference(value: any): value is string;
4
5
  export declare function parseReference(ref: string): string;
5
6
  export declare function uid(): string;
6
7
  export declare function getValue(obj: Record<string, any>, path: string): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkmodules/rules",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",