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
clapton-0.0.1 lib/clapton/javascripts/node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.47 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.46 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.45 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.44 node_modules/lodash/_assignValue.js
boring_generators-0.14.0 tmp/templates/app_template/node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.43 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.42 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.41 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.40 node_modules/lodash/_assignValue.js
sumomo-0.10.8 data/sumomo/api_modules/node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.39 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.38 node_modules/lodash/_assignValue.js
optimacms-0.1.61 spec/dummy/node_modules/lodash/_assignValue.js
boring_generators-0.13.0 tmp/templates/app_template/node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.32 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.31 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.30 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.29 node_modules/lodash/_assignValue.js
immosquare-cleaner-0.1.28 node_modules/lodash/_assignValue.js