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

x/rambda/mod.ts>modifyPath

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

It changes a property of object on the base of provided path and transformer function.

Type Parameters

T extends Record<string, unknown>

Parameters

path: Path
fn: (x: any) => unknown
object: Record<string, unknown>

Type Parameters

T extends Record<string, unknown>

Parameters

path: Path
fn: (x: any) => unknown

Returns

(object: Record<string, unknown>) => T

Type Parameters

T extends Record<string, unknown>

Parameters

path: Path

Returns

(fn: (x: any) => unknown) => (object: Record<string, unknown>) => T