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

identity

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

The canonical identity function. It returns whatever value was passed to it.

@example
import { identity } from "./fn.ts";

const result1 = identity(1); // 1
const result2 = identity("Hello"); // "Hello"
function identity<A>(a: A): A;
§
identity<A>(a: A): A
[src]

§Type Parameters

§Parameters

§Return Type