Sha256: 86658dd4d24a55b19ed938416c179d57a729bac601133c237ee9f900dd21027d

Contents?: true

Size: 899 Bytes

Versions: 273

Compression:

Stored size: 899 Bytes

Contents

var baseAssignValue = require('./_baseAssignValue'),
    eq = require('./eq');

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

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

/**
 * Assigns `value` to `key` of `object` if the existing value is not equivalent
 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * for equality comparisons.
 *
 * @private
 * @param {Object} object The object to modify.
 * @param {string} key The key of the property to assign.
 * @param {*} value The value to assign.
 */
function assignValue(object, key, value) {
  var objValue = object[key];
  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
      (value === undefined && !(key in object))) {
    baseAssignValue(object, key, value);
  }
}

module.exports = assignValue;

Version data entries

273 entries across 271 versions & 29 rubygems

Version Path
immosquare-cleaner-0.1.60 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.59 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.58 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.57 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.56 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.55 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.54 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.53 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.52 node_modules/lodash/_assignValue.js
trusty-cms-6.3.1 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.51 node_modules/lodash/_assignValue.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/_assignValue.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/_assignValue.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.50 node_modules/lodash/_assignValue.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/_assignValue.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/_assignValue.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/_assignValue.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/lodash/_assignValue.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/lodash/_assignValue.js