Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/proc/src/deps/asynciter.ts>filter

A high-level way to run child processes that is easy, flexible, powerful, and prevents resource leaks.
Go to Latest
function filter
Re-export
import { filter } from "https://deno.land/x/proc@0.20.24/src/deps/asynciter.ts";

Filter the sequence to contain just the items that pass a test.

Parameters

iterable: AsyncIterable<T>

An iterable collection.

filterFn: (item: T) => boolean | Promise<boolean>

The filter function; true to keep the item, false to discard.

Returns

AsyncIterableIterator<T>

An iterator returning the values that pass the filter function.