Remove isIterateeCall.

This commit is contained in:
John-David Dalton
2017-03-03 23:32:24 -08:00
parent ba52c744ae
commit 17f7069d07
11 changed files with 11 additions and 93 deletions

View File

@@ -1,5 +1,4 @@
import baseSlice from './.internal/baseSlice.js'
import isIterateeCall from './.internal/isIterateeCall.js'
import toInteger from './toInteger.js'
/**
@@ -21,14 +20,8 @@ function slice(array, start, end) {
if (!length) {
return []
}
if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
start = 0
end = length
}
else {
start = start == null ? 0 : toInteger(start)
end = end === undefined ? length : toInteger(end)
}
start = start == null ? 0 : toInteger(start)
end = end === undefined ? length : toInteger(end)
return baseSlice(array, start, end)
}