Skip to main content
Module

x/async_channels/src/channel.ts>Channel#flat

Inspired by Go & Clojure Channels, async_channels provides channels as an asynchronous communication method between asynchronous functions.
Latest
method Channel.prototype.flat
import { Channel } from "https://deno.land/x/async_channels@v1.0.0-rc8/src/channel.ts";

flat returns a receiver channel that contains the flattened (1 level) values of each value of this channel.

The receiver channel will close, when the original channel closes (or if the provided signal is triggered).

Parameters

this: Receiver<Iterable<K> | AsyncIterable<K>>
optional
pipeOpts: ChannelPipeOptions