Skip to main content
Module

x/ldkit/library/asynciterator.ts>AsyncIterator#filter

LDkit - Linked Data query toolkit for TypeScript developers
Go to Latest
method AsyncIterator.prototype.filter
Re-export
import { AsyncIterator } from "https://deno.land/x/ldkit@v0.6.4/library/asynciterator.ts";

Return items from this iterator that match the filter. After this operation, only read the returned iterator instead of the current one.

Type Parameters

K extends T

Parameters

filter: (item: T) => item is K

A filter function to call on this iterator's (remaining) items

optional
self: any

The this pointer for the filter function

Returns

A new iterator that filters items from this iterator

Parameters

filter: (item: T) => boolean
optional
self: any