Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

takeWhile

import { takeWhile } from "https://raw.githubusercontent.com/surma/observables-with-streams/28c55be6d855780c677fd1f4ba975f4d3144891d/src/index.ts";

Returns a Transform that emits items from the original observable until f returns false.

function takeWhile<T>(f: (v: T) => boolean): Transform<T>;
§
takeWhile<T>(f: (v: T) => boolean): Transform<T>
[src]

§Type Parameters

§Parameters

§
f: (v: T) => boolean
[src]

Function called with each emitted item. If it returns true, the item is emitted. Otherwise the item is discarded and no more items are emitted.

§Return Type

§

Transform that emits some items from the original observable.