Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ahh/mod.ts>Iterator#peekable

Opinionated idiomatic type-safety functions.
Go to Latest
method Iterator.prototype.peekable
import { Iterator } from "https://deno.land/x/ahh@v0.12.0/mod.ts";

Creates an Iterator that can be return the next item without consuming it.

Examples

Example 1

import { default as I } from "./iterator.ts";

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

console.log(iter.peek());

Returns

Peekable<T>