stratifyBranch()
D56 branch node body: declared deps [source, rules], no internal subscribe island.
Import
Section titled “Import”import { stratifyBranch } from "@graphrefly/ts/composition";Signature
Section titled “Signature”function stratifyBranch( source: Node<T>, rules: Node<R>, classifier: (rules: R, value: T) => boolean, opts: StratifyBranchOptions<T> = {},): Node<T>Parameters
Section titled “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
Section titled “Returns”A Node<T> value.
Example
Section titled “Example”import { stratifyBranch } from "@graphrefly/ts/composition";Source
Section titled “Source”packages/ts/src/graph/composition.ts