Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rambda/immutable.d.ts>objOf

Faster and smaller alternative to Ramda
Latest
function objOf
import { objOf } from "https://deno.land/x/rambda@9.4.1/immutable.d.ts";

It creates an object with a single key-value pair.

Type Parameters

T
K extends string

Parameters

key: K
value: T

Returns

Record<K, T>

Type Parameters

K extends string

Returns

<T>(value: T) => Record<K, T>