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

lookupWithKey

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

Lookup the value in a record at key and return an optional pair with the key and the value if the record holds the key. Returns None if the record does not hold the key.

@example
import * as R from "./record.ts";
import { pipe } from "./fn.ts";

const result1 = pipe(
  { one: 1, two: 2 },
  R.lookupWithKey('one'),
); // Some(['one', 1])
const result2 = pipe(
  { one: 1, two: 2 },
  R.lookupWithKey('three'),
); // None
function lookupWithKey(key: string): <A>(ua: ReadonlyRecord<A>) => Option<Pair<string, A>>;
§
lookupWithKey(key: string): <A>(ua: ReadonlyRecord<A>) => Option<Pair<string, A>>
[src]

§Parameters

§
key: string
[src]

§Return Type

§
<A>(ua: ReadonlyRecord<A>) => Option<Pair<string, A>>
[src]