mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Remove isIterateeCall.
This commit is contained in:
11
slice.js
11
slice.js
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user