mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
# add dist
This commit is contained in:
63
ng2-components/ng2-alfresco-documentslist/dist/node_modules/lodash/assign.js
generated
vendored
Normal file
63
ng2-components/ng2-alfresco-documentslist/dist/node_modules/lodash/assign.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
var assignValue = require('./_assignValue'),
|
||||
copyObject = require('./_copyObject'),
|
||||
createAssigner = require('./_createAssigner'),
|
||||
isArrayLike = require('./isArrayLike'),
|
||||
isPrototype = require('./_isPrototype'),
|
||||
keys = require('./keys');
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to check objects for own properties. */
|
||||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||||
|
||||
/** Built-in value references. */
|
||||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||
|
||||
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
|
||||
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
|
||||
|
||||
/**
|
||||
* Assigns own enumerable string keyed properties of source objects to the
|
||||
* destination object. Source objects are applied from left to right.
|
||||
* Subsequent sources overwrite property assignments of previous sources.
|
||||
*
|
||||
* **Note:** This method mutates `object` and is loosely based on
|
||||
* [`Object.assign`](https://mdn.io/Object/assign).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.10.0
|
||||
* @category Object
|
||||
* @param {Object} object The destination object.
|
||||
* @param {...Object} [sources] The source objects.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.c = 3;
|
||||
* }
|
||||
*
|
||||
* function Bar() {
|
||||
* this.e = 5;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.d = 4;
|
||||
* Bar.prototype.f = 6;
|
||||
*
|
||||
* _.assign({ 'a': 1 }, new Foo, new Bar);
|
||||
* // => { 'a': 1, 'c': 3, 'e': 5 }
|
||||
*/
|
||||
var assign = createAssigner(function(object, source) {
|
||||
if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
|
||||
copyObject(source, keys(source), object);
|
||||
return;
|
||||
}
|
||||
for (var key in source) {
|
||||
if (hasOwnProperty.call(source, key)) {
|
||||
assignValue(object, key, source[key]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = assign;
|
Reference in New Issue
Block a user