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
| Parameter | Type | Description |
|---|---|---|
source | Node<T> | Source node that provides graph-visible input. |
rules | Node<R> | rules value used by the helper. |
classifier | (rules: R, value: T) => boolean | classifier value used by the helper. |
opts | StratifyBranchOptions<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