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

Method setEdgeValue

src/graph.js:90–99  ·  view source on GitHub ↗
(x, y, v)

Source from the content-addressed store, hash-verified

88 }
89
90 setEdgeValue (x, y, v) {
91 let result = false;
92
93 if (defined(this.nodes[x]) && defined(this.nodes[x].edges[y])) {
94 this.nodes[x].edges[y] = this.nodes[y].edges[x] = defined(v) ? v : null;
95 result = true;
96 }
97
98 return result;
99 }
100
101 setNodeValue (x, v) {
102 const n = this.nodes[x];

Callers 1

graph.jsFile · 0.45

Calls 1

definedFunction · 0.70

Tested by

no test coverage detected