Skip to main content
Module

x/ahh/mod.ts>I.count

Idiomatic type-safety functions.
Go to Latest
method I.count
import { I } from "https://deno.land/x/ahh@v0.10.1/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