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

x/stream_observables/mod.ts>filter

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

Returns a Transform that emits all items for which f returns true.

Parameters

f: (x: T) => boolean

Function called with each emitted item. If it returns true, the item is emitted. Otherwise the item is discarded.

Returns

Transform that emits some items from the original observable.