This project has been succeeded by GraphReFly. New development happens at graphrefly-ts. npm install @graphrefly/graphrefly
Skip to content

buffer() ​

Collects upstream values into arrays, flushing each buffer when notifier emits (Tier 2).

Signature ​

ts
function buffer<A>(notifier: Store<unknown>): StoreOperator<A, A[]>

Parameters ​

ParameterTypeDescription
notifierStore&lt;unknown&gt;Any store whose emissions trigger a flush.

Returns ​

StoreOperator&lt;A, A[]&gt; — get() returns last flushed array (empty before first flush).

Options / Behavior Details ​

  • End: Upstream or notifier completion flushes remaining items when applicable.

See Also ​

Released under the MIT License.