Remove isFunction use.

This commit is contained in:
John-David Dalton
2017-02-24 23:34:08 -08:00
parent 37f168d466
commit ffcb38f74d
4 changed files with 6 additions and 8 deletions

View File

@@ -1,7 +1,6 @@
import arrayEach from './.internal/arrayEach.js'
import baseForOwn from './.internal/baseForOwn.js'
import isBuffer from './isBuffer.js'
import isFunction from './isFunction.js'
import isObject from './isObject.js'
import isTypedArray from './isTypedArray.js'
@@ -44,7 +43,9 @@ function transform(object, iteratee, accumulator) {
accumulator = isArr ? new Ctor : []
}
else if (isObject(object)) {
accumulator = isFunction(Ctor) ? Object.create(Object.getPrototypeOf(object)) : {}
accumulator = typeof Ctor == 'function'
? Object.create(Object.getPrototypeOf(object))
: {}
}
else {
accumulator = {}