MCPcopy Index your code
hub / github.com/Effect-TS/effect / getNode

Function getNode

packages/effect/src/Graph.ts:499–502  ·  view source on GitHub ↗
(
  graph: Graph<N, E, T> | MutableGraph<N, E, T>,
  nodeIndex: NodeIndex
)

Source from the content-addressed store, hash-verified

497 * @category getters
498 */
499export 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.

Callers 1

nextMappedFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…