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://raw.githubusercontent.com/baetheus/fun/main/option.ts";

Create an Option by wrapping any value A in Some.

@example
import * as O from "./option.ts";

const result1 = O.wrap(1); // Some(1)
const result2 = O.wrap("Hello"); // Some("Hello")
function wrap<A>(a: A): Option<A>;
§
wrap<A>(a: A): Option<A>
[src]

§Type Parameters

§Parameters

§Return Type