MCPcopy
hub / github.com/lodash/lodash / set

Function set

lodash.js:13772–13774  ·  view source on GitHub ↗

* Sets the value at `path` of `object`. If a portion of `path` doesn't exist, * it's created. Arrays are created for missing index properties while objects * are created for all other missing properties. Use `_.setWith` to customize * `path` creation. * * **Note:** This meth

(object, path, value)

Source from the content-addressed store, hash-verified

13770 * // => 5
13771 */
13772 function set(object, path, value) {
13773 return object == null ? object : baseSet(object, path, value);
13774 }
13775
13776 /**
13777 * This method is like `_.set` except that it accepts `customizer` which is

Callers

nothing calls this directly

Calls 1

baseSetFunction · 0.85

Tested by

no test coverage detected