Skip to main content

@terascope/utils / iterators

iterators

Functions

isAsyncIterator()

isAsyncIterator<T>(input): input is AsyncIterable<T>

Returns true if the input is an async iterator

Type parameters

Type parameter
T

Parameters

ParameterType
inputunknown

Returns

input is AsyncIterable<T>

Source

packages/utils/src/iterators.ts:11


isIterator()

isIterator<T>(input): input is Iterable<T>

Returns true if the input is an iterator

Type parameters

Type parameter
T

Parameters

ParameterType
inputunknown

Returns

input is Iterable<T>

Source

packages/utils/src/iterators.ts:4