Skip to content
PACKAGES

pairwise()

pairwise: emit [previous, current] for each consecutive pair; the very first value produces no pair (quiet → undirty RESOLVED). Previous value is kept in ctx.state.

import { pairwise } from "@graphrefly/ts/operators";
function pairwise(): Operator<S, readonly [S, S]>

A Operator<S, readonly [S, S]> value.

import { pairwise } from "@graphrefly/ts/operators";

packages/ts/src/graph/operators.ts