Skip to main content

isIterable() function

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Checks if an object is iterable (can be used for for..of)

Signature:

export declare function isIterable<T>(obj: any): obj is Iterable<T>

Parameters

ParameterTypeDescription
objany

the variable to be checked

This API may change without a BREAKING CHANGE notice.

Returns:

obj is Iterable<T>