Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/itertools/mod.ts>dropwhile

🦕 A TypeScript port of Python's itertools and more-itertools for Deno
Go to Latest
function dropwhile
import { dropwhile } from "https://deno.land/x/itertools@v1.1.1/mod.ts";

Returns an iterator that drops elements from the iterable as long as the predicate is true; afterwards, returns every remaining element. Note, the iterator does not produce any output until the predicate first becomes false.

Parameters

iterable: Iterable<T>
predicate: Predicate<T>

Returns

Iterable<T>