You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/object-graph.doc.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,39 +18,39 @@ Returns an instance of ObjectGraph.
18
18
19
19
### length
20
20
21
-
Returns the length of the object graph.
21
+
Returns the length of the graph.
22
22
23
23
### size
24
24
25
-
Returns the size of the object graph.
25
+
Returns the size of the graph.
26
26
27
27
## Instance Methods
28
28
29
29
### keys()
30
30
31
-
Returns an iterator object that contains the keys of the object graph.
31
+
Returns an iterator that contains the keys of the graph.
32
32
33
33
### values()
34
34
35
-
Returns an iterator object that contains the values of the object graph.
35
+
Returns an iterator that contains the values of the graph.
36
36
37
37
### get()
38
38
39
-
Returns a node of the object graph.
39
+
Returns a node of the graph.
40
40
41
41
#### Parameters
42
42
43
43
| Name | Type | Default | Description |
44
44
| --- | --- | --- | --- |
45
-
| nodeKey |`string`| - |__Required.__ The key of the node to return from the object graph. |
45
+
| nodeKey |`string`| - |__Required.__ The key of the node to return from the graph. |
46
46
47
47
### copy()
48
48
49
-
Returns a copy of the original object graph.
49
+
Returns a copy of the original graph.
50
50
51
51
### subgraph()
52
52
53
-
Returns a subgraph of the original object graph.
53
+
Returns a subgraph of the original graph.
54
54
55
55
#### Parameters
56
56
@@ -60,73 +60,73 @@ Returns a subgraph of the original object graph.
60
60
61
61
### add()
62
62
63
-
Adds a node to the object graph.
63
+
Adds a node to the graph.
64
64
65
65
#### Parameters
66
66
67
67
| Name | Type | Default | Description |
68
68
| --- | --- | --- | --- |
69
-
| nodeValue |`NodeValue`| - |__Required.__ The value of the node to add to the object graph. |
69
+
| nodeValue |`NodeValue`| - |__Required.__ The value of the node to add to the graph. |
70
70
71
71
### toAdded()
72
72
73
-
Returns a copy of the original object graph with a received node added.
73
+
Returns a copy of the original graph with a received node added.
74
74
75
75
#### Parameters
76
76
77
77
| Name | Type | Default | Description |
78
78
| --- | --- | --- | --- |
79
-
| nodeValue |`NodeValue`| - |__Required.__ The value of the node to add to the object graph. |
79
+
| nodeValue |`NodeValue`| - |__Required.__ The value of the node to add to the graph. |
80
80
81
81
### update()
82
82
83
-
Updates a node in the object graph.
83
+
Updates a node in the graph.
84
84
85
85
#### Parameters
86
86
87
87
| Name | Type | Default | Description |
88
88
| --- | --- | --- | --- |
89
-
| nodeValue |`NodeValue`| - |__Required.__ The value of the node to update in the object graph. |
89
+
| nodeValue |`NodeValue`| - |__Required.__ The value of the node to update in the graph. |
90
90
91
91
### toUpdated()
92
92
93
-
Returns a copy of the original object graph with a received node updated.
93
+
Returns a copy of the original graph with a received node updated.
94
94
95
95
#### Parameters
96
96
97
97
| Name | Type | Default | Description |
98
98
| --- | --- | --- | --- |
99
-
| nodeValue |`NodeValue`| - |__Required.__ The value of the node to update in the object graph. |
99
+
| nodeValue |`NodeValue`| - |__Required.__ The value of the node to update in the graph. |
100
100
101
101
### remove()
102
102
103
-
Removes a node from the object graph.
103
+
Removes a node from the graph.
104
104
105
105
#### Parameters
106
106
107
107
| Name | Type | Default | Description |
108
108
| --- | --- | --- | --- |
109
-
| nodeKey |`string`| - |__Required.__ The key of the node to remove from the object graph. |
109
+
| nodeKey |`string`| - |__Required.__ The key of the node to remove from the graph. |
110
110
111
111
### toRemoved()
112
112
113
-
Returns a copy of the original object graph with a received node removed.
113
+
Returns a copy of the original graph with a received node removed.
114
114
115
115
#### Parameters
116
116
117
117
| Name | Type | Default | Description |
118
118
| --- | --- | --- | --- |
119
-
| nodeKey |`string`| - |__Required.__ The key of the node to remove from the object graph. |
119
+
| nodeKey |`string`| - |__Required.__ The key of the node to remove from the graph. |
120
120
121
121
### valuesOf()
122
122
123
-
Returns a list of unique values for a specified property across selected nodes in the object graph. If no selection is made, it operates on the entire graph.
123
+
Returns a list of unique values for a specified property across selected nodes in the graph. If no selection is made, it operates on the entire graph.
124
124
125
125
#### Parameters
126
126
127
127
| Name | Type | Default | Description |
128
128
| --- | --- | --- | --- |
129
-
| propertyKey |`keyof NodeValue`| - |__Required.__ The property key of the node values to return from the object graph. |
129
+
| propertyKey |`keyof NodeValue`| - |__Required.__ The property key of the node values to return from the graph. |
130
130
| nodeKeys |`Array<string>`| - | The array of nodes keys to define the selected nodes. |
131
131
132
132
### valuesBy()
@@ -141,4 +141,4 @@ Returns all nodes that match with the provided shape.
141
141
142
142
| Name | Type | Default | Description |
143
143
| --- | --- | --- | --- |
144
-
| shape |`Partial<Record<keyof NodeValue, unknown>>`| - |__Required.__ The shape of the nodes to return from the object graph. |
144
+
| shape |`Partial<Record<keyof NodeValue, unknown>>`| - |__Required.__ The shape of the nodes to return from the graph. |
* @description Returns a list of unique values for a specified property across selected nodes in the object graph. If no selection is made, it operates on the entire graph.
189
+
* @description Returns a list of unique values for a specified property across selected nodes in the graph. If no selection is made, it operates on the entire graph.
0 commit comments