( graph: Graph<N, E, T> | MutableGraph<N, E, T>, nodeIndex: NodeIndex )
| 497 | * @category getters |
| 498 | */ |
| 499 | export const getNode = <N, E, T extends Kind = "directed">( |
| 500 | graph: Graph<N, E, T> | MutableGraph<N, E, T>, |
| 501 | nodeIndex: NodeIndex |
| 502 | ): Option.Option<N> => graph.nodes.has(nodeIndex) ? Option.some(graph.nodes.get(nodeIndex)!) : Option.none() |
| 503 | |
| 504 | /** |
| 505 | * Checks if a node with the given index exists in the graph. |
no test coverage detected
searching dependent graphs…