Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

wrap

import { wrap } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/async_iterable.ts";

Wrap a single value in an AsyncIterable.

@example
import { wrap } from "./async_iterable.ts";

const singleValue = wrap("Hello");

for await (const value of singleValue) {
  console.log(value); // "Hello"
}
function wrap<A>(a: A): AsyncIterable<A>;
§
wrap<A>(a: A): AsyncIterable<A>
[src]

§Type Parameters

§Parameters

§Return Type

§
AsyncIterable<A>
[src]