@hpcc-js/util 2.46.1 → 2.47.1

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.
Files changed (79) hide show
  1. package/LICENSE +43 -43
  2. package/dist/index.js +2373 -2281
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/lib-es6/__package__.js +3 -3
  7. package/lib-es6/array.js +84 -84
  8. package/lib-es6/cache.js +60 -60
  9. package/lib-es6/debounce.js +85 -85
  10. package/lib-es6/dictionary.js +61 -61
  11. package/lib-es6/dispatch.js +101 -101
  12. package/lib-es6/esp.js +32 -32
  13. package/lib-es6/graph.js +348 -348
  14. package/lib-es6/graph2.js +603 -603
  15. package/lib-es6/hashSum.js +49 -49
  16. package/lib-es6/immutable.js +144 -54
  17. package/lib-es6/immutable.js.map +1 -1
  18. package/lib-es6/index.js +21 -21
  19. package/lib-es6/logging.js +178 -177
  20. package/lib-es6/logging.js.map +1 -1
  21. package/lib-es6/math.js +90 -90
  22. package/lib-es6/object.js +121 -121
  23. package/lib-es6/observer.js +79 -79
  24. package/lib-es6/platform.js +17 -17
  25. package/lib-es6/saxParser.js +125 -125
  26. package/lib-es6/stack.js +41 -41
  27. package/lib-es6/stateful.js +170 -170
  28. package/lib-es6/string.js +22 -22
  29. package/lib-es6/url.js +32 -32
  30. package/package.json +3 -3
  31. package/src/__package__.ts +2 -2
  32. package/src/array.ts +98 -98
  33. package/src/cache.ts +65 -65
  34. package/src/debounce.ts +88 -88
  35. package/src/dictionary.ts +69 -69
  36. package/src/dispatch.ts +119 -119
  37. package/src/esp.ts +32 -32
  38. package/src/graph.ts +353 -353
  39. package/src/graph2.ts +661 -661
  40. package/src/hashSum.ts +55 -55
  41. package/src/immutable.ts +156 -57
  42. package/src/index.ts +21 -21
  43. package/src/logging.ts +212 -211
  44. package/src/math.ts +92 -92
  45. package/src/object.ts +117 -117
  46. package/src/observer.ts +91 -91
  47. package/src/platform.ts +20 -20
  48. package/src/saxParser.ts +135 -135
  49. package/src/stack.ts +41 -41
  50. package/src/stateful.ts +178 -178
  51. package/src/string.ts +21 -21
  52. package/src/url.ts +27 -27
  53. package/types/__package__.d.ts +3 -3
  54. package/types/array.d.ts +13 -13
  55. package/types/cache.d.ts +20 -20
  56. package/types/debounce.d.ts +12 -12
  57. package/types/dictionary.d.ts +20 -20
  58. package/types/dispatch.d.ts +26 -26
  59. package/types/dispatch.d.ts.map +1 -1
  60. package/types/esp.d.ts +1 -1
  61. package/types/graph.d.ts +73 -73
  62. package/types/graph2.d.ts +111 -111
  63. package/types/hashSum.d.ts +1 -1
  64. package/types/immutable.d.ts +3 -2
  65. package/types/immutable.d.ts.map +1 -1
  66. package/types/index.d.ts +21 -21
  67. package/types/logging.d.ts +57 -57
  68. package/types/logging.d.ts.map +1 -1
  69. package/types/math.d.ts +70 -70
  70. package/types/object.d.ts +48 -48
  71. package/types/observer.d.ts +18 -18
  72. package/types/platform.d.ts +5 -5
  73. package/types/saxParser.d.ts +28 -28
  74. package/types/stack.d.ts +28 -28
  75. package/types/stateful.d.ts +33 -33
  76. package/types/string.d.ts +2 -2
  77. package/types/url.d.ts +2 -2
  78. package/types-3.4/__package__.d.ts +2 -2
  79. package/types-3.4/immutable.d.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../src/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,oBAAY,oBAAoB,GAAG,CAAC,QAAQ,EAAE,oBAAoB,KAAK,MAAM,GAAG,SAAS,CAAC;AAC1F,oBAAY,oBAAoB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,CAAC;AAwBxE,qBAAa,OAAO;IAEhB,IAAI,WAAW,IAAI,OAAO,CAAkB;IAC5C,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAIjC,I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AAS,OAAO,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAEvE,oBAAY,QAAQ,CAAC,CAAC,SAAS,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,CAAC;AAQ3B,qBAAa,QAAQ,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IAE7C,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,UAAU,CAAyB;IAC3C,OAAO,CAAC,cAAc,CAAW;;IAKjC,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,QAAQ;IAUhB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,QAAQ;IAUhB,WAAW,IAAI,OAAO;IAItB,KAAK;IAIL,IAAI,CAAC,GAAG,EAAE,CAAC;IAIX,IAAI,CAAC,GAAG,EAAE,CAAC;IAKX,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,eAAe;CAa/E"}
package/types/esp.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare function espTime2Seconds(duration: string): number;
1
+ export declare function espTime2Seconds(duration: string): number;
2
2
  //# sourceMappingURL=esp.d.ts.map
package/types/graph.d.ts CHANGED
@@ -1,74 +1,74 @@
1
- export declare class GraphItem<S, V, E> {
2
- protected _graph: Graph<S, V, E>;
3
- readonly parent: Subgraph<S, V, E> | null;
4
- readonly props: {
5
- [key: string]: any;
6
- };
7
- constructor(graph: Graph<S, V, E>, parent: Subgraph<S, V, E> | null);
8
- }
9
- export declare class Subgraph<S, V, E> extends GraphItem<S, V, E> {
10
- readonly subgraphs: Array<Subgraph<S, V, E>>;
11
- readonly vertices: Array<Vertex<S, V, E>>;
12
- readonly edges: Array<Edge<S, V, E>>;
13
- readonly _?: S;
14
- constructor(graph: Graph<S, V, E>, parent: Subgraph<S, V, E> | null, _?: S);
15
- remove(full?: boolean): void;
16
- createSubgraph(_?: S): Subgraph<S, V, E>;
17
- _addSubgraph(subgraph: Subgraph<S, V, E>): void;
18
- _removeSubgraph(subgraph: Subgraph<S, V, E>): void;
19
- removeAllSubgraphs(): void;
20
- createVertex(_?: V): Vertex<S, V, E>;
21
- _addVertex(vertex: Vertex<S, V, E>): void;
22
- _removeVertex(vertex: Vertex<S, V, E>): void;
23
- removeAllVertices(): void;
24
- createEdge(source: Vertex<S, V, E>, target: Vertex<S, V, E>, _?: E): Edge<S, V, E>;
25
- _addEdge(edge: Edge<S, V, E>): void;
26
- _removeEdge(edge: Edge<S, V, E>): void;
27
- _add(item: Subgraph<S, V, E> | Vertex<S, V, E> | Edge<S, V, E>): void;
28
- }
29
- export declare class Vertex<S, V, E> extends GraphItem<S, V, E> {
30
- readonly inEdges: Array<Edge<S, V, E>>;
31
- readonly outEdges: Array<Edge<S, V, E>>;
32
- get edges(): ReadonlyArray<Edge<S, V, E>>;
33
- readonly _?: V;
34
- constructor(graph: Graph<S, V, E>, parent: Subgraph<S, V, E>, _?: V);
35
- remove(full?: boolean, _?: (source: V, target: V) => E): void;
36
- addInEdge(edge: Edge<S, V, E>): void;
37
- removeInEdge(edge: Edge<S, V, E>): void;
38
- addOutEdge(edge: Edge<S, V, E>): void;
39
- removeOutEdge(edge: Edge<S, V, E>): void;
40
- }
41
- export declare class Edge<S, V, E> extends GraphItem<S, V, E> {
42
- readonly source: Vertex<S, V, E>;
43
- readonly target: Vertex<S, V, E>;
44
- readonly _?: E;
45
- constructor(graph: Graph<S, V, E>, parent: Subgraph<S, V, E>, source: Vertex<S, V, E>, target: Vertex<S, V, E>, _?: E);
46
- remove(): void;
47
- }
48
- export declare class Graph<S = undefined, V = undefined, E = undefined> {
49
- readonly root: Subgraph<S, V, E>;
50
- private _allSubgraphs;
51
- private _allSubgraphsMap;
52
- private _allVertices;
53
- private _allVerticesMap;
54
- private _allEdges;
55
- private _allEdgesMap;
56
- idOf: (item: Subgraph<S, V, E> | Vertex<S, V, E> | Edge<S, V, E>) => string;
57
- constructor(idOf?: (item: Subgraph<S, V, E> | Vertex<S, V, E> | Edge<S, V, E>) => string, _?: S);
58
- createSubgraph(parent?: Subgraph<S, V, E>, _?: S): Subgraph<S, V, E>;
59
- removeSubgraph(subgraph: Subgraph<S, V, E>, full?: boolean): void;
60
- get subgraphs(): ReadonlyArray<Subgraph<S, V, E>>;
61
- subgraph(id: string): Subgraph<S, V, E>;
62
- createVertex(parent: Subgraph<S, V, E>, _?: V): Vertex<S, V, E>;
63
- removeVertex(vertex: Vertex<S, V, E>, full?: boolean, _?: (source: V, target: V) => E): void;
64
- get vertices(): ReadonlyArray<Vertex<S, V, E>>;
65
- vertex(id: string): Vertex<S, V, E>;
66
- createEdge(parent: Subgraph<S, V, E>, source: Vertex<S, V, E>, target: Vertex<S, V, E>, _?: E): Edge<S, V, E>;
67
- removeEdge(edge: Edge<S, V, E>): void;
68
- get edges(): ReadonlyArray<Edge<S, V, E>>;
69
- edge(id: string): Edge<S, V, E>;
70
- private _walk;
71
- walk(visitor: (visitor: GraphItem<S, V, E>) => "abort" | "stepover" | void): true | undefined;
72
- clone(): Graph<S, V, E>;
73
- }
1
+ export declare class GraphItem<S, V, E> {
2
+ protected _graph: Graph<S, V, E>;
3
+ readonly parent: Subgraph<S, V, E> | null;
4
+ readonly props: {
5
+ [key: string]: any;
6
+ };
7
+ constructor(graph: Graph<S, V, E>, parent: Subgraph<S, V, E> | null);
8
+ }
9
+ export declare class Subgraph<S, V, E> extends GraphItem<S, V, E> {
10
+ readonly subgraphs: Array<Subgraph<S, V, E>>;
11
+ readonly vertices: Array<Vertex<S, V, E>>;
12
+ readonly edges: Array<Edge<S, V, E>>;
13
+ readonly _?: S;
14
+ constructor(graph: Graph<S, V, E>, parent: Subgraph<S, V, E> | null, _?: S);
15
+ remove(full?: boolean): void;
16
+ createSubgraph(_?: S): Subgraph<S, V, E>;
17
+ _addSubgraph(subgraph: Subgraph<S, V, E>): void;
18
+ _removeSubgraph(subgraph: Subgraph<S, V, E>): void;
19
+ removeAllSubgraphs(): void;
20
+ createVertex(_?: V): Vertex<S, V, E>;
21
+ _addVertex(vertex: Vertex<S, V, E>): void;
22
+ _removeVertex(vertex: Vertex<S, V, E>): void;
23
+ removeAllVertices(): void;
24
+ createEdge(source: Vertex<S, V, E>, target: Vertex<S, V, E>, _?: E): Edge<S, V, E>;
25
+ _addEdge(edge: Edge<S, V, E>): void;
26
+ _removeEdge(edge: Edge<S, V, E>): void;
27
+ _add(item: Subgraph<S, V, E> | Vertex<S, V, E> | Edge<S, V, E>): void;
28
+ }
29
+ export declare class Vertex<S, V, E> extends GraphItem<S, V, E> {
30
+ readonly inEdges: Array<Edge<S, V, E>>;
31
+ readonly outEdges: Array<Edge<S, V, E>>;
32
+ get edges(): ReadonlyArray<Edge<S, V, E>>;
33
+ readonly _?: V;
34
+ constructor(graph: Graph<S, V, E>, parent: Subgraph<S, V, E>, _?: V);
35
+ remove(full?: boolean, _?: (source: V, target: V) => E): void;
36
+ addInEdge(edge: Edge<S, V, E>): void;
37
+ removeInEdge(edge: Edge<S, V, E>): void;
38
+ addOutEdge(edge: Edge<S, V, E>): void;
39
+ removeOutEdge(edge: Edge<S, V, E>): void;
40
+ }
41
+ export declare class Edge<S, V, E> extends GraphItem<S, V, E> {
42
+ readonly source: Vertex<S, V, E>;
43
+ readonly target: Vertex<S, V, E>;
44
+ readonly _?: E;
45
+ constructor(graph: Graph<S, V, E>, parent: Subgraph<S, V, E>, source: Vertex<S, V, E>, target: Vertex<S, V, E>, _?: E);
46
+ remove(): void;
47
+ }
48
+ export declare class Graph<S = undefined, V = undefined, E = undefined> {
49
+ readonly root: Subgraph<S, V, E>;
50
+ private _allSubgraphs;
51
+ private _allSubgraphsMap;
52
+ private _allVertices;
53
+ private _allVerticesMap;
54
+ private _allEdges;
55
+ private _allEdgesMap;
56
+ idOf: (item: Subgraph<S, V, E> | Vertex<S, V, E> | Edge<S, V, E>) => string;
57
+ constructor(idOf?: (item: Subgraph<S, V, E> | Vertex<S, V, E> | Edge<S, V, E>) => string, _?: S);
58
+ createSubgraph(parent?: Subgraph<S, V, E>, _?: S): Subgraph<S, V, E>;
59
+ removeSubgraph(subgraph: Subgraph<S, V, E>, full?: boolean): void;
60
+ get subgraphs(): ReadonlyArray<Subgraph<S, V, E>>;
61
+ subgraph(id: string): Subgraph<S, V, E>;
62
+ createVertex(parent: Subgraph<S, V, E>, _?: V): Vertex<S, V, E>;
63
+ removeVertex(vertex: Vertex<S, V, E>, full?: boolean, _?: (source: V, target: V) => E): void;
64
+ get vertices(): ReadonlyArray<Vertex<S, V, E>>;
65
+ vertex(id: string): Vertex<S, V, E>;
66
+ createEdge(parent: Subgraph<S, V, E>, source: Vertex<S, V, E>, target: Vertex<S, V, E>, _?: E): Edge<S, V, E>;
67
+ removeEdge(edge: Edge<S, V, E>): void;
68
+ get edges(): ReadonlyArray<Edge<S, V, E>>;
69
+ edge(id: string): Edge<S, V, E>;
70
+ private _walk;
71
+ walk(visitor: (visitor: GraphItem<S, V, E>) => "abort" | "stepover" | void): true | undefined;
72
+ clone(): Graph<S, V, E>;
73
+ }
74
74
  //# sourceMappingURL=graph.d.ts.map
package/types/graph2.d.ts CHANGED
@@ -1,112 +1,112 @@
1
- declare type ID = string | number;
2
- declare class GraphItem<T = any> {
3
- protected _graph: Graph2;
4
- _: T;
5
- id(): ID;
6
- constructor(g: Graph2, _: T);
7
- }
8
- declare class ChildGraphItem<S = any> extends GraphItem<S> {
9
- private _parent;
10
- constructor(g: Graph2, _: S);
11
- clearParent(): this;
12
- parent(): Subgraph | undefined;
13
- parent(_: Subgraph | undefined): this;
14
- }
15
- declare class Subgraph<S = any> extends ChildGraphItem<S> {
16
- private _children;
17
- constructor(g: Graph2, _: S);
18
- children(): ChildGraphItem[];
19
- addChild(_: ChildGraphItem): void;
20
- removeChild(_: ChildGraphItem): void;
21
- }
22
- declare class Vertex<V = any> extends ChildGraphItem<V> {
23
- private _inEdges;
24
- private _outEdges;
25
- constructor(g: Graph2, _: V);
26
- edges(): Edge<any>[];
27
- edgeCount(): number;
28
- inEdges(): Edge<any>[];
29
- addInEdge(e: Edge): void;
30
- removeInEdge(id: ID): void;
31
- outEdges(): Edge<any>[];
32
- addOutEdge(e: Edge): void;
33
- removeOutEdge(id: ID): void;
34
- }
35
- declare class Edge<E = any> extends ChildGraphItem<E> {
36
- _source: Vertex;
37
- _target: Vertex;
38
- constructor(g: Graph2, _: E, source: Vertex, target: Vertex);
39
- }
40
- export declare type HierarchyFormatter<V, S> = (type: "subgraph" | "vertex", item: V | S, children?: object[]) => object;
41
- export declare class Graph2<V = any, E = any, S = any> {
42
- private _directed;
43
- private _subgraphMap;
44
- private _vertexMap;
45
- private _edgeMap;
46
- constructor(directed?: boolean);
47
- clear(): this;
48
- clearParents(): this;
49
- isDirected(): boolean;
50
- _idFunc: (_: any) => string;
51
- idFunc(_: (_: S | V | E) => string): this;
52
- _sourceFunc: (_: any) => ID;
53
- sourceFunc(_: (_: E) => ID): this;
54
- _targetFunc: (_: any) => ID;
55
- targetFunc(_: (_: E) => ID): this;
56
- _updateFunc: (before: S | V | E, after: S | V | E) => S | V | E;
57
- updateFunc(_: (before: S | V | E, after: S | V | E) => S | V | E): this;
58
- id(_: S | V | E): string;
59
- type(id: ID): "S" | "V" | "E" | "";
60
- isSubgraph(_: S | V | E): _ is S;
61
- isVertex(_: S | V | E): _ is V;
62
- isEdge(_: S | V | E): _ is E;
63
- allItems(): Array<S | V | E>;
64
- item(id: ID): S | V | E | undefined;
65
- itemExists(id: ID): boolean;
66
- allSubgraphs(): S[];
67
- subgraphs(): S[];
68
- subgraphExists(id: ID): boolean;
69
- subgraph(id: ID): S;
70
- subgraphSubgraphs(id: ID): S[];
71
- subgraphVertices(id: ID): V[];
72
- subgraphEdges(id: ID): E[];
73
- addSubgraph(s: S, parent?: S): this;
74
- mergeSubgraphs(_subgraphs?: S[]): this;
75
- updateSubgraph(sg: S): this;
76
- removeSubgraph(id: ID, promoteChildren?: boolean): this;
77
- subgraphParent(id: ID): S | undefined;
78
- subgraphParent(id: ID, parentID: ID): this;
79
- allVertices(): V[];
80
- vertices(): V[];
81
- vertexExists(id: ID): boolean;
82
- vertex(id: ID): V;
83
- allEdges(): E[];
84
- edges(): E[];
85
- vertexEdges(vertexID: string): E[];
86
- inEdges(vertexID: string): E[];
87
- outEdges(vertexID: string): E[];
88
- private _neighbors;
89
- neighbors(id: ID): V[];
90
- singleNeighbors(id: ID): V[];
91
- addVertex(v: V, parent?: S): this;
92
- mergeVertices(_vertices: V[]): this;
93
- updateVertex(v: V): this;
94
- removeVertex(id: ID): this;
95
- vertexParent(id: ID): S | undefined;
96
- vertexParent(id: ID, parentID: ID): this;
97
- edgeExists(id: ID): boolean;
98
- edge(id: ID): E;
99
- addEdge(e: E, parent?: S): this;
100
- mergeEdges(_edges: E[]): this;
101
- updateEdge(e: E): this;
102
- removeEdge(id: ID): this;
103
- protected _hwalk(item: Subgraph<S> | Vertex<V>, formatter: HierarchyFormatter<V, S>): object;
104
- hierarchy(formatter: HierarchyFormatter<V, S>): object[];
105
- dijkstra(source: string, target: string): {
106
- ids: string[];
107
- len: number;
108
- };
109
- sort(v_id?: string): V[];
110
- }
111
- export {};
1
+ declare type ID = string | number;
2
+ declare class GraphItem<T = any> {
3
+ protected _graph: Graph2;
4
+ _: T;
5
+ id(): ID;
6
+ constructor(g: Graph2, _: T);
7
+ }
8
+ declare class ChildGraphItem<S = any> extends GraphItem<S> {
9
+ private _parent;
10
+ constructor(g: Graph2, _: S);
11
+ clearParent(): this;
12
+ parent(): Subgraph | undefined;
13
+ parent(_: Subgraph | undefined): this;
14
+ }
15
+ declare class Subgraph<S = any> extends ChildGraphItem<S> {
16
+ private _children;
17
+ constructor(g: Graph2, _: S);
18
+ children(): ChildGraphItem[];
19
+ addChild(_: ChildGraphItem): void;
20
+ removeChild(_: ChildGraphItem): void;
21
+ }
22
+ declare class Vertex<V = any> extends ChildGraphItem<V> {
23
+ private _inEdges;
24
+ private _outEdges;
25
+ constructor(g: Graph2, _: V);
26
+ edges(): Edge<any>[];
27
+ edgeCount(): number;
28
+ inEdges(): Edge<any>[];
29
+ addInEdge(e: Edge): void;
30
+ removeInEdge(id: ID): void;
31
+ outEdges(): Edge<any>[];
32
+ addOutEdge(e: Edge): void;
33
+ removeOutEdge(id: ID): void;
34
+ }
35
+ declare class Edge<E = any> extends ChildGraphItem<E> {
36
+ _source: Vertex;
37
+ _target: Vertex;
38
+ constructor(g: Graph2, _: E, source: Vertex, target: Vertex);
39
+ }
40
+ export declare type HierarchyFormatter<V, S> = (type: "subgraph" | "vertex", item: V | S, children?: object[]) => object;
41
+ export declare class Graph2<V = any, E = any, S = any> {
42
+ private _directed;
43
+ private _subgraphMap;
44
+ private _vertexMap;
45
+ private _edgeMap;
46
+ constructor(directed?: boolean);
47
+ clear(): this;
48
+ clearParents(): this;
49
+ isDirected(): boolean;
50
+ _idFunc: (_: any) => string;
51
+ idFunc(_: (_: S | V | E) => string): this;
52
+ _sourceFunc: (_: any) => ID;
53
+ sourceFunc(_: (_: E) => ID): this;
54
+ _targetFunc: (_: any) => ID;
55
+ targetFunc(_: (_: E) => ID): this;
56
+ _updateFunc: (before: S | V | E, after: S | V | E) => S | V | E;
57
+ updateFunc(_: (before: S | V | E, after: S | V | E) => S | V | E): this;
58
+ id(_: S | V | E): string;
59
+ type(id: ID): "S" | "V" | "E" | "";
60
+ isSubgraph(_: S | V | E): _ is S;
61
+ isVertex(_: S | V | E): _ is V;
62
+ isEdge(_: S | V | E): _ is E;
63
+ allItems(): Array<S | V | E>;
64
+ item(id: ID): S | V | E | undefined;
65
+ itemExists(id: ID): boolean;
66
+ allSubgraphs(): S[];
67
+ subgraphs(): S[];
68
+ subgraphExists(id: ID): boolean;
69
+ subgraph(id: ID): S;
70
+ subgraphSubgraphs(id: ID): S[];
71
+ subgraphVertices(id: ID): V[];
72
+ subgraphEdges(id: ID): E[];
73
+ addSubgraph(s: S, parent?: S): this;
74
+ mergeSubgraphs(_subgraphs?: S[]): this;
75
+ updateSubgraph(sg: S): this;
76
+ removeSubgraph(id: ID, promoteChildren?: boolean): this;
77
+ subgraphParent(id: ID): S | undefined;
78
+ subgraphParent(id: ID, parentID: ID): this;
79
+ allVertices(): V[];
80
+ vertices(): V[];
81
+ vertexExists(id: ID): boolean;
82
+ vertex(id: ID): V;
83
+ allEdges(): E[];
84
+ edges(): E[];
85
+ vertexEdges(vertexID: string): E[];
86
+ inEdges(vertexID: string): E[];
87
+ outEdges(vertexID: string): E[];
88
+ private _neighbors;
89
+ neighbors(id: ID): V[];
90
+ singleNeighbors(id: ID): V[];
91
+ addVertex(v: V, parent?: S): this;
92
+ mergeVertices(_vertices: V[]): this;
93
+ updateVertex(v: V): this;
94
+ removeVertex(id: ID): this;
95
+ vertexParent(id: ID): S | undefined;
96
+ vertexParent(id: ID, parentID: ID): this;
97
+ edgeExists(id: ID): boolean;
98
+ edge(id: ID): E;
99
+ addEdge(e: E, parent?: S): this;
100
+ mergeEdges(_edges: E[]): this;
101
+ updateEdge(e: E): this;
102
+ removeEdge(id: ID): this;
103
+ protected _hwalk(item: Subgraph<S> | Vertex<V>, formatter: HierarchyFormatter<V, S>): object;
104
+ hierarchy(formatter: HierarchyFormatter<V, S>): object[];
105
+ dijkstra(source: string, target: string): {
106
+ ids: string[];
107
+ len: number;
108
+ };
109
+ sort(v_id?: string): V[];
110
+ }
111
+ export {};
112
112
  //# sourceMappingURL=graph2.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare function hashSum(o: any): string;
1
+ export declare function hashSum(o: any): string;
2
2
  //# sourceMappingURL=hashSum.d.ts.map
@@ -1,3 +1,4 @@
1
- export declare function deepEquals(a: any, b: any): boolean;
2
- export declare function update<T>(origItem: T, newItem: T): T;
1
+ export declare function verboseDeepEquals(a: any, b: any): boolean;
2
+ export declare function deepEquals(a: any, b: any): boolean;
3
+ export declare function update<T>(origItem: T, newItem: T): T;
3
4
  //# sourceMappingURL=immutable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"immutable.d.ts","sourceRoot":"","sources":["../src/immutable.ts"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,WAgDxC;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAEpD"}
1
+ {"version":3,"file":"immutable.d.ts","sourceRoot":"","sources":["../src/immutable.ts"],"names":[],"mappings":"AAIA,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,WA6F/C;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,WAoDxC;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAEpD"}
package/types/index.d.ts CHANGED
@@ -1,22 +1,22 @@
1
- export * from "./__package__";
2
- export * from "./array";
3
- export * from "./cache";
4
- export * from "./debounce";
5
- export * from "./dictionary";
6
- export * from "./esp";
7
- export * from "./graph";
8
- export * from "./graph2";
9
- export * from "./hashSum";
10
- export * from "./immutable";
11
- export * from "./logging";
12
- export * from "./math";
13
- export * from "./object";
14
- export * from "./observer";
15
- export * from "./dispatch";
16
- export * from "./platform";
17
- export * from "./saxParser";
18
- export * from "./stack";
19
- export * from "./stateful";
20
- export * from "./string";
21
- export * from "./url";
1
+ export * from "./__package__";
2
+ export * from "./array";
3
+ export * from "./cache";
4
+ export * from "./debounce";
5
+ export * from "./dictionary";
6
+ export * from "./esp";
7
+ export * from "./graph";
8
+ export * from "./graph2";
9
+ export * from "./hashSum";
10
+ export * from "./immutable";
11
+ export * from "./logging";
12
+ export * from "./math";
13
+ export * from "./object";
14
+ export * from "./observer";
15
+ export * from "./dispatch";
16
+ export * from "./platform";
17
+ export * from "./saxParser";
18
+ export * from "./stack";
19
+ export * from "./stateful";
20
+ export * from "./string";
21
+ export * from "./url";
22
22
  //# sourceMappingURL=index.d.ts.map
@@ -1,58 +1,58 @@
1
- export declare enum Level {
2
- debug = 0,
3
- info = 1,
4
- notice = 2,
5
- warning = 3,
6
- error = 4,
7
- critical = 5,
8
- alert = 6,
9
- emergency = 7
10
- }
11
- export interface Writer {
12
- write?(dateTime: string, level: Level, id: string, msg: string): void;
13
- rawWrite?(dateTime: string, level: Level, id: string, msg: string | object): void;
14
- }
15
- export declare class Logging {
16
- private static _instance;
17
- private _levelStack;
18
- private _level;
19
- private _filter;
20
- private _writer;
21
- static Instance(): Logging;
22
- private constructor();
23
- private stringify;
24
- writer(): Writer;
25
- writer(_: Writer): Logging;
26
- log(level: Level, id: string, msg: string | object): void;
27
- debug(id: string, msg: string | object): void;
28
- info(id: string, msg: string | object): void;
29
- notice(id: string, msg: string | object): void;
30
- warning(id: string, msg: string | object): void;
31
- error(id: string, msg: string | object): void;
32
- critical(id: string, msg: string | object): void;
33
- alert(id: string, msg: string | object): void;
34
- emergency(id: string, msg: string | object): void;
35
- level(): Level;
36
- level(_: Level): this;
37
- pushLevel(_: Level): this;
38
- popLevel(): this;
39
- filter(): string;
40
- filter(_: string): this;
41
- }
42
- export declare const logger: Logging;
43
- export declare class ScopedLogging {
44
- protected _scopeID: string;
45
- constructor(scopeID: string);
46
- debug(msg: string | object): void;
47
- info(msg: string | object): void;
48
- notice(msg: string | object): void;
49
- warning(msg: string | object): void;
50
- error(msg: string | object): void;
51
- critical(msg: string | object): void;
52
- alert(msg: string | object): void;
53
- emergency(msg: string | object): void;
54
- pushLevel(_: Level): this;
55
- popLevel(): this;
56
- }
57
- export declare function scopedLogger(scopeID: string, filter?: boolean): ScopedLogging;
1
+ export declare enum Level {
2
+ debug = 0,
3
+ info = 1,
4
+ notice = 2,
5
+ warning = 3,
6
+ error = 4,
7
+ critical = 5,
8
+ alert = 6,
9
+ emergency = 7
10
+ }
11
+ export interface Writer {
12
+ write?(dateTime: string, level: Level, id: string, msg: string): void;
13
+ rawWrite?(dateTime: string, level: Level, id: string, msg: string | object): void;
14
+ }
15
+ export declare class Logging {
16
+ private static _instance;
17
+ private _levelStack;
18
+ private _level;
19
+ private _filter;
20
+ private _writer;
21
+ static Instance(): Logging;
22
+ private constructor();
23
+ private stringify;
24
+ writer(): Writer;
25
+ writer(_: Writer): Logging;
26
+ log(level: Level, id: string, msg: string | object): void;
27
+ debug(id: string, msg: string | object): void;
28
+ info(id: string, msg: string | object): void;
29
+ notice(id: string, msg: string | object): void;
30
+ warning(id: string, msg: string | object): void;
31
+ error(id: string, msg: string | object): void;
32
+ critical(id: string, msg: string | object): void;
33
+ alert(id: string, msg: string | object): void;
34
+ emergency(id: string, msg: string | object): void;
35
+ level(): Level;
36
+ level(_: Level): this;
37
+ pushLevel(_: Level): this;
38
+ popLevel(): this;
39
+ filter(): string;
40
+ filter(_: string): this;
41
+ }
42
+ export declare const logger: Logging;
43
+ export declare class ScopedLogging {
44
+ protected _scopeID: string;
45
+ constructor(scopeID: string);
46
+ debug(msg: string | object): void;
47
+ info(msg: string | object): void;
48
+ notice(msg: string | object): void;
49
+ warning(msg: string | object): void;
50
+ error(msg: string | object): void;
51
+ critical(msg: string | object): void;
52
+ alert(msg: string | object): void;
53
+ emergency(msg: string | object): void;
54
+ pushLevel(_: Level): this;
55
+ popLevel(): this;
56
+ }
57
+ export declare function scopedLogger(scopeID: string, filter?: boolean): ScopedLogging;
58
58
  //# sourceMappingURL=logging.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../src/logging.ts"],"names":[],"mappings":"AAGA,oBAAY,KAAK;IACb,KAAK,IAAA;IACL,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,OAAO,IAAA;IACP,KAAK,IAAA;IACL,QAAQ,IAAA;IACR,KAAK,IAAA;IACL,SAAS,IAAA;CACZ;AAaD,MAAM,WAAW,MAAM;IACnB,KA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