GraphReFlyTS

API Reference

takeWhile()

takeWhile: emit values while pred holds; on the first value that fails pred, COMPLETE WITHOUT emitting it (RxJS default, non-inclusive). Terminal-is-forever once it completes.

Import

import { takeWhile } from "@graphrefly/ts/operators";

Signature

function takeWhile(pred: (v: S) => boolean): Operator<S, S>

Parameters

ParameterTypeDescription
pred(v: S) => booleanpred value used by the helper.

Returns

A Operator<S, S> value.

Example

import { takeWhile } from "@graphrefly/ts/operators";

Source

packages/ts/src/graph/operators.ts