Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

buffer

import { buffer } from "https://raw.githubusercontent.com/surma/observables-with-streams/28c55be6d855780c677fd1f4ba975f4d3144891d/src/index.ts";

Collects items from the original observable into buffers until the notifier emits. If no items have been buffered since the last time the notifier emitted, nothing will be emitted. Closing the emitter will emit the remaining buffer.

function buffer<T>(notifier: Observable<unknown>): Transform<T, T[]>;
§
buffer<T>(notifier: Observable<unknown>): Transform<T, T[]>
[src]

§Type Parameters

§Parameters

§
notifier: Observable<unknown>
[src]

Observable that emits when the buffer should be emitted.

§Return Type

§

Transform that emits arrays of items from the original observable.