• Maps and filters the nodes of a graph. Return undefined to exclude a node from the results.

    Type Parameters

    • TReturn

      The return type of the mapper function.

    • TGraph extends default<Attributes, Attributes, Attributes>

      The type of the graph.

    Parameters

    • graph: TGraph

      The graph to map and filter.

    • mapper: NodeMapper<TReturn, InferGraphNode<TGraph>>

      The function used to map each node of the graph.

    Returns Exclude<TReturn, undefined>[]

    An array of mapped and filtered values.

Generated using TypeDoc