Skip to main content
Module

x/lodash_es/mod.ts>setWith

lodash for deno use
Latest
function setWith
import { setWith } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

This method is like _.set except that it accepts customizer which is invoked to produce the objects of path. If customizer returns undefined path creation is handled by the method instead. The customizer is invoked with three arguments: (nsValue, key, nsObject).

Note: This method mutates object.

Examples

var object = {};

_.setWith(object, '[0][1]', 'a', Object); // => { '0': { '1': 'a' } }

Parameters

object

The object to modify.

path

The path of the property to set.

value

The value to set.

customizer