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

Usage

import * as observablesWithStreams from "https://raw.githubusercontent.com/surma/observables-with-streams/28c55be6d855780c677fd1f4ba975f4d3144891d/src/sinks/index.ts";

§Functions

collect

Collects all values from the observable into an array.

discard

Sink for observables that discards all values. Useful to leave at the end of a chain.

extractFirst

Resolves with the first element emitted by the observable, then releases the observable. If no items are emitted the promise is rejected.

extractLast

Resolves with the last element emitted by the observable. If no items are emitted the promise is rejected.

reduce

Accumulates value, starting with v0 and applying f to each emitted item. If no items are emitted the promise is rejected.

single

Resolves with the only element emitted by the observable. If zero or more than one items are emitted, the promise is rejected.

subscribe

Alias for discard.