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/iterable.ts";

Create an Iterable from a variable number of values.

@example
import * as I from "./iterable.ts";

const numbers = I.wrap(1, 2, 3, 4, 5);
const strings = I.wrap("hello", "world");

const result1 = Array.from(numbers); // [1, 2, 3, 4, 5]
const result2 = Array.from(strings); // ["hello", "world"]
function wrap<A>(...a: A[]): Iterable<A>;
§
wrap<A>(...a: A[]): Iterable<A>
[src]

§Type Parameters

§Parameters

§
...a: A[] optional
[src]

§Return Type

§
Iterable<A>
[src]