import { patchAtWith } from "https://deno.land/x/rimbu@0.13.0/deep/mod.ts";
Returns a function that patches a given value
with the given patchItems
at the given path
.
Examples
Example 1
Example 1
const items = [{ a: { b: 1, c: 'a' } }, { a: { b: 2, c: 'b' } }];
items.map(Deep.patchAtWith('a', [{ b: (v) => v + 1 }]));
// => [{ a: { b: 2, c: 'a' } }, { a: { b: 3, c: 'b' } }]