Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/stream_observables/transforms/mod.ts>map

A collection of observables built with ReadableStreams & friends.
Latest
function map
Re-export
import { map } from "https://deno.land/x/stream_observables@v1.3/transforms/mod.ts";

Returns a Transform with the results of applying the given function to each emitted item of the original observable.

Parameters

f: (x: S) => T | Promise<T>

Function called with each emitted item. If it returns a promise, the result is awaited then emitted.

Returns

Transform that emits items produced by f.