Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/graph/custom/index.ts>GraphElement.getSingleNode

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function GraphElement.getSingleNode
import { GraphElement } from "https://deno.land/x/rimbu@1.0.3/graph/custom/index.ts";
const { getSingleNode } = GraphElement;

Returns the value of a single node graph element if the given element e is a single node, or the given otherwise fallback value otherwise.

Parameters

e: GraphElement<N>
  • the graph element

Returns

N | undefined