GraphReFlyTS

API Reference

stratifyBranch()

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

Import

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

Signature

function stratifyBranch(
	source: Node<T>,
	rules: Node<R>,
	classifier: (rules: R, value: T) => boolean,
	opts: StratifyBranchOptions<T> = {},
): Node<T>

Parameters

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.

Returns

A Node<T> value.

Example

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

Source

packages/ts/src/graph/composition.ts