Skip to main content
Module

x/ldkit/library/asynciterator.ts>AsyncIterator#surround

LDkit - Linked Data query toolkit for TypeScript developers
Go to Latest
method AsyncIterator.prototype.surround
Re-export
import { AsyncIterator } from "https://deno.land/x/ldkit@v0.6.4/library/asynciterator.ts";

Surrounds items of the current iterator with the given items. After this operation, only read the returned iterator instead of the current one.

Parameters

prepend: AsyncIteratorOrArray<T>

Items to insert before this iterator's (remaining) items

append: AsyncIteratorOrArray<T>

Items to insert after this iterator's (remaining) items

Returns

A new iterator that appends and prepends items to this iterator