MCPcopy Index your code
hub / github.com/avoidwork/tiny-graph / setEdgeValue

Method setEdgeValue

lib/tiny-graph.js:110–119  ·  view source on GitHub ↗
(x, y, v)

Source from the content-addressed store, hash-verified

108 }
109
110 setEdgeValue (x, y, v) {
111 let result = false;
112
113 if (defined(this.nodes[x]) && defined(this.nodes[x].edges[y])) {
114 this.nodes[x].edges[y] = this.nodes[y].edges[x] = defined(v) ? v : null;
115 result = true;
116 }
117
118 return result;
119 }
120
121 setNodeValue (x, v) {
122 const n = this.nodes[x];

Callers

nothing calls this directly

Calls 1

definedFunction · 0.70

Tested by

no test coverage detected