🧩 Returns the total count of items in an iterable.
Syntax
TypeScript
import { countIter } from '@opentf/std'; countIter(iter: Iterable<unknown>): number
Parameters
iter: The source iterable.
Returns
The total count of items.
Examples
TypeScript
countIter((function*() { yield 1; yield 2; })()) //=> 2