Checks if the given value is an iterable.
Syntax
TypeScript
import { isIterable } from '@opentf/std'; isIterable(val: unknown): val is Iterable<unknown>
Parameters
val: The value to check.
Returns
true if the value is iterable, false otherwise.
Examples
TypeScript
isIterable([1, 2, 3]) //=> true isIterable('abc') //=> true isIterable({}) //=> false