mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
Add ES6 _.assign alias of _.extend.
Former-commit-id: 20a0e0d295cb90a1756a5831b0b6684b97477170
This commit is contained in:
@@ -409,6 +409,14 @@
|
||||
Foo.prototype = { 'c': 3 };
|
||||
deepEqual(_.extend({}, Foo), expected);
|
||||
});
|
||||
|
||||
test('should work with `_.reduce`', function() {
|
||||
var actual = { 'a': 1},
|
||||
array = [{ 'b': 2 }, { 'c': 3 }];
|
||||
|
||||
_.reduce(array, _.extend, actual);
|
||||
deepEqual(actual, { 'a': 1, 'b': 2, 'c': 3});
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user