Skip to content
PACKAGES

buffer()

buffer: accumulate dep 0 (source) DATA; flush the buffer as an array each time dep 1 (notifier) delivers DATA. partial:true + ctx.state buffer. On source COMPLETE, flush any remainder then COMPLETE (completeWhenDepsComplete:false + terminalAsRealInput:true; a notifier terminal is ignored). Source/notifier ERROR propagates (default errorWhenDepsError).

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

A Operator<unknown, S[]> value.

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

packages/ts/src/graph/combinators.ts