Bump to v4.5.1.

This commit is contained in:
John-David Dalton
2016-02-21 20:49:38 -08:00
parent 2b1eb3f480
commit 9055c4e483
30 changed files with 143 additions and 91 deletions

View File

@@ -7,6 +7,9 @@ import isFunction from './isFunction';
import isObject from './isObject';
import isTypedArray from './isTypedArray';
/** Built-in value references. */
var getPrototypeOf = Object.getPrototypeOf;
/**
* An alternative to `_.reduce`; this method transforms `object` to a new
* `accumulator` object which is the result of running each of its own enumerable
@@ -45,7 +48,7 @@ function transform(object, iteratee, accumulator) {
if (isArr) {
accumulator = isArray(object) ? new Ctor : [];
} else {
accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
accumulator = isFunction(Ctor) ? baseCreate(getPrototypeOf(object)) : {};
}
} else {
accumulator = {};