takeWhile module

Type aliases

Functions

Type aliases

PredicateFunction

Ƭ PredicateFunction: function

Defined in index.ts:6

Predicate

Type declaration:

▸ (item: T, index: number): boolean

Parameters:

Name Type Description
item T item to check
index number item index in stream

TakeWhile

Ƭ TakeWhile: function

Defined in index.ts:17

TakeWhile function (creates slice of a steam)

Type declaration:

▸ (iterable: Iterable‹T›): IterableIterator‹T›

Parameters:

Name Type Description
iterable Iterable‹T› input stream

Functions

takeWhile

takeWhileT›(filterFn: PredicateFunction‹T›): TakeWhile‹T›

Defined in index.ts:30

Function to take items from input stream while predicate returns true

Type parameters:

T

Parameters:

Name Type
filterFn PredicateFunction‹T›

Returns: TakeWhile‹T›

filter function

takeWhileT›(predicate: PredicateFunction‹T›, iterable: Iterable‹T›): IterableIterator‹T›

Defined in index.ts:38

Function to take items from input stream while predicate returns true

Type parameters:

T

Parameters:

Name Type Description
predicate PredicateFunction‹T› filter predicate
iterable Iterable‹T› input stream

Returns: IterableIterator‹T›

output filtered stream

results matching ""

    No results matching ""