1 var copyObject = require('./_copyObject'),
2 createAssigner = require('./_createAssigner'),
3 keys = require('./keys');
6 * Assigns own enumerable properties of source objects to the destination
7 * object. Source objects are applied from left to right. Subsequent sources
8 * overwrite property assignments of previous sources.
10 * **Note:** This method mutates `object` and is loosely based on
11 * [`Object.assign`](https://mdn.io/Object/assign).
16 * @param {Object} object The destination object.
17 * @param {...Object} [sources] The source objects.
18 * @returns {Object} Returns `object`.
29 * Foo.prototype.d = 4;
30 * Bar.prototype.f = 6;
32 * _.assign({ 'a': 1 }, new Foo, new Bar);
33 * // => { 'a': 1, 'c': 3, 'e': 5 }
35 var assign = createAssigner(function(object, source) {
36 copyObject(source, keys(source), object);
39 module.exports = assign;