Skip to main content
Module

x/fae/mod.ts>set

A functional module for Deno inspired from Ramda.
Latest
variable set
import { set } from "https://deno.land/x/fae@v1.1.1/mod.ts";

Returns the result of "setting" the portion of the given data structure target focused by the given lens to the given value.

 const xLens = Fae.lensProp('x')
 Fae.set(xLens, 4, {x: 1, y: 2})  // {x: 4, y: 2}
 Fae.set(xLens, 8, {x: 1, y: 2})  // {x: 8, y: 2}

type

Set