mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Remove baseSlice.
This commit is contained in:
4
drop.js
4
drop.js
@@ -1,4 +1,4 @@
|
||||
import baseSlice from './.internal/baseSlice.js'
|
||||
import slice from './slice.js'
|
||||
|
||||
/**
|
||||
* Creates a slice of `array` with `n` elements dropped from the beginning.
|
||||
@@ -25,7 +25,7 @@ import baseSlice from './.internal/baseSlice.js'
|
||||
function drop(array, n=1) {
|
||||
const length = array == null ? 0 : array.length
|
||||
return length
|
||||
? baseSlice(array, n < 0 ? 0 : n, length)
|
||||
? slice(array, n < 0 ? 0 : n, length)
|
||||
: []
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user