mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Remove coercion method use.
This commit is contained in:
5
slice.js
5
slice.js
@@ -1,5 +1,4 @@
|
||||
import baseSlice from './.internal/baseSlice.js'
|
||||
import toInteger from './toInteger.js'
|
||||
|
||||
/**
|
||||
* Creates a slice of `array` from `start` up to, but not including, `end`.
|
||||
@@ -20,8 +19,8 @@ function slice(array, start, end) {
|
||||
if (!length) {
|
||||
return []
|
||||
}
|
||||
start = start == null ? 0 : toInteger(start)
|
||||
end = end === undefined ? length : toInteger(end)
|
||||
start = start == null ? 0 : start
|
||||
end = end === undefined ? length : end
|
||||
return baseSlice(array, start, end)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user