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

x/rambda/mod.ts>modify

Faster and smaller alternative to Ramda
Go to Latest
function modify
import { modify } from "https://deno.land/x/rambda@9.2.1/mod.ts";

Type Parameters

T extends object
K extends keyof T
P

Parameters

prop: K
fn: (a: T[K]) => P
obj: T

Returns

Omit<T, K> & Record<K, P>

Type Parameters

K extends string
A
P

Parameters

prop: K
fn: (a: A) => P

Returns

<T extends Record<K, A>>(target: T) => Omit<T, K> & Record<K, P>