mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Use more destructuring.
This commit is contained in:
@@ -10,7 +10,7 @@ import baseSlice from './baseSlice.js'
|
||||
* @returns {Array} Returns the cast slice.
|
||||
*/
|
||||
function castSlice(array, start, end) {
|
||||
const length = array.length
|
||||
const { length } = array
|
||||
end = end === undefined ? length : end
|
||||
return (!start && end >= length) ? array : baseSlice(array, start, end)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user