Remove baseTimes.

This commit is contained in:
John-David Dalton
2017-03-07 21:12:54 -08:00
parent 41a8d2272e
commit 9260bd2f57
4 changed files with 19 additions and 33 deletions

View File

@@ -1,4 +1,3 @@
import baseTimes from './baseTimes.js'
import isArguments from '../isArguments.js'
import isBuffer from '../isBuffer.js'
import isIndex from './isIndex.js'
@@ -21,9 +20,12 @@ function arrayLikeKeys(value, inherited) {
const isBuff = !isArr && !isArg && isBuffer(value)
const isType = !isArr && !isArg && !isBuff && isTypedArray(value)
const skipIndexes = isArr || isArg || isBuff || isType
const result = skipIndexes ? baseTimes(value.length, String) : []
const length = result.length
const length = value.length
const result = new Array(skipIndexes ? length : 0)
let index = skipIndexes ? -1 : length
while (++index < length) {
result[index] = `${ index }`
}
for (const key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
!(skipIndexes && (