UNPKG

431 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3function findNodeWithinGraph(nodeId, graph) {
4 for (var i = 0; i < graph.nodes.length; i++) {
5 if (nodeId === graph.nodes[i].id) {
6 return graph.nodes[i];
7 }
8 }
9 throw Error('Could not find internal node within graph');
10}
11exports.findNodeWithinGraph = findNodeWithinGraph;
12//# sourceMappingURL=findNodeWithinGraph.js.map
\No newline at end of file