Sha256: 67b49eecee29813be6f16a9662ad3d6bd8f1ffed0e06e1a1647b6c1d259fcbcd

Contents?: true

Size: 1.03 KB

Versions: 303

Compression:

Stored size: 1.03 KB

Contents

var baseSet = require('./_baseSet');

/**
 * 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`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Object
 * @param {Object} object The object to modify.
 * @param {Array|string} path The path of the property to set.
 * @param {*} value The value to set.
 * @param {Function} [customizer] The function to customize assigned values.
 * @returns {Object} Returns `object`.
 * @example
 *
 * var object = {};
 *
 * _.setWith(object, '[0][1]', 'a', Object);
 * // => { '0': { '1': 'a' } }
 */
function setWith(object, path, value, customizer) {
  customizer = typeof customizer == 'function' ? customizer : undefined;
  return object == null ? object : baseSet(object, path, value, customizer);
}

module.exports = setWith;

Version data entries

303 entries across 279 versions & 33 rubygems

Version Path
rapid_stack-0.2.0 templates/frontend/node_modules/lodash/setWith.js
rapid_stack-0.1.1 templates/FrontEnd/node_modules/lodash/setWith.js
rapid_stack-0.1.0 templates/FrontEnd/node_modules/lodash/setWith.js
immosquare-cleaner-0.1.60 node_modules/lodash/setWith.js
immosquare-cleaner-0.1.59 node_modules/lodash/setWith.js
immosquare-cleaner-0.1.58 node_modules/lodash/setWith.js
immosquare-cleaner-0.1.57 node_modules/lodash/setWith.js
immosquare-cleaner-0.1.56 node_modules/lodash/setWith.js
immosquare-cleaner-0.1.55 node_modules/lodash/setWith.js
immosquare-cleaner-0.1.54 node_modules/lodash/setWith.js
immosquare-cleaner-0.1.53 node_modules/lodash/setWith.js
immosquare-cleaner-0.1.52 node_modules/lodash/setWith.js
trusty-cms-6.3.1 node_modules/lodash/setWith.js
immosquare-cleaner-0.1.51 node_modules/lodash/setWith.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/setWith.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/setWith.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/setWith.js
immosquare-cleaner-0.1.50 node_modules/lodash/setWith.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/setWith.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/setWith.js