Sha256: ab79963aa13e9c8ec3621998637839d6376d14a9b4f64646b2bcd3349b4cdc80

Contents?: true

Size: 934 Bytes

Versions: 261

Compression:

Stored size: 934 Bytes

Contents

var eq = require('./eq');

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
 * of source objects to the destination object for all destination properties
 * that resolve to `undefined`.
 *
 * @private
 * @param {*} objValue The destination value.
 * @param {*} srcValue The source value.
 * @param {string} key The key of the property to assign.
 * @param {Object} object The parent object of `objValue`.
 * @returns {*} Returns the value to assign.
 */
function customDefaultsAssignIn(objValue, srcValue, key, object) {
  if (objValue === undefined ||
      (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
    return srcValue;
  }
  return objValue;
}

module.exports = customDefaultsAssignIn;

Version data entries

261 entries across 260 versions & 28 rubygems

Version Path
trusty-cms-6.3.1 node_modules/lodash/_customDefaultsAssignIn.js
immosquare-cleaner-0.1.51 node_modules/lodash/_customDefaultsAssignIn.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
immosquare-cleaner-0.1.50 node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
immosquare-cleaner-0.1.49 node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js
immosquare-cleaner-0.1.48 node_modules/lodash/_customDefaultsAssignIn.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/lodash/_customDefaultsAssignIn.js