Sha256: 234a2d230d6e509db6aa6fc06a02e5e5e3dd1cfda63f38dc33c9c185a212f789

Contents?: true

Size: 950 Bytes

Versions: 153

Compression:

Stored size: 950 Bytes

Contents

/** Used for native method references. */
var objectProto = Object.prototype;

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

/**
 * Used by `_.template` to customize its `_.assign` use.
 *
 * **Note:** This function is like `assignDefaults` except that it ignores
 * inherited property values when checking if a property is `undefined`.
 *
 * @private
 * @param {*} objectValue The destination object property value.
 * @param {*} sourceValue The source object property value.
 * @param {string} key The key associated with the object and source values.
 * @param {Object} object The destination object.
 * @returns {*} Returns the value to assign to the destination object.
 */
function assignOwnDefaults(objectValue, sourceValue, key, object) {
  return (objectValue === undefined || !hasOwnProperty.call(object, key))
    ? sourceValue
    : objectValue;
}

module.exports = assignOwnDefaults;

Version data entries

153 entries across 80 versions & 8 rubygems

Version Path
ilog-0.4.1 node_modules/contents/node_modules/lodash/internal/assignOwnDefaults.js
ilog-0.4.1 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/assignOwnDefaults.js
ilog-0.4.1 node_modules/babel/node_modules/lodash/internal/assignOwnDefaults.js
ilog-0.4.0 node_modules/babel/node_modules/lodash/internal/assignOwnDefaults.js
ilog-0.4.0 node_modules/contents/node_modules/lodash/internal/assignOwnDefaults.js
ilog-0.4.0 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/assignOwnDefaults.js
ilog-0.3.3 node_modules/babel/node_modules/lodash/internal/assignOwnDefaults.js
ilog-0.3.3 node_modules/contents/node_modules/lodash/internal/assignOwnDefaults.js
ilog-0.3.3 node_modules/babel-plugin-proto-to-assign/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/assignOwnDefaults.js
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/configstore/node_modules/js-yaml/node_modules/argparse/node_modules/lodash/internal/assignOwnDefaults.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/inquirer/node_modules/lodash/internal/assignOwnDefaults.js