Skip to content
PACKAGES

stratifyBranch()

D56 branch node body: declared deps [source, rules], no internal subscribe island.

import { stratifyBranch } from "@graphrefly/ts/composition";
function stratifyBranch(
source: Node<T>,
rules: Node<R>,
classifier: (rules: R, value: T) => boolean,
opts: StratifyBranchOptions<T> = {},
): Node<T>
ParameterTypeDescription
sourceNode<T>Source node that provides graph-visible input.
rulesNode<R>rules value used by the helper.
classifier(rules: R, value: T) => booleanclassifier value used by the helper.
optsStratifyBranchOptions<T>Options that configure the helper.

A Node<T> value.

import { stratifyBranch } from "@graphrefly/ts/composition";

packages/ts/src/graph/composition.ts