Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ahh/src/iter/mod.ts>I.count

Idiomatic type-safety structures for TypeScript.
Go to Latest
method I.count
import { I } from "https://deno.land/x/ahh@v0.10.0/src/iter/mod.ts";

Consumes an Iterator and returns the number of iterations.

Examples

import { I } from "./mod.ts";

const iter = I.iter(["hello", "there", "world"]);

console.log(I.count(iter)); // 3
console.log(iter.next()); // undefined

Returns

number