mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Remove baseSlice.
This commit is contained in:
4
take.js
4
take.js
@@ -1,4 +1,4 @@
|
||||
import baseSlice from './.internal/baseSlice.js'
|
||||
import slice from './slice.js'
|
||||
|
||||
/**
|
||||
* Creates a slice of `array` with `n` elements taken from the beginning.
|
||||
@@ -26,7 +26,7 @@ function take(array, n=1) {
|
||||
if (!(array != null && array.length)) {
|
||||
return []
|
||||
}
|
||||
return baseSlice(array, 0, n < 0 ? 0 : n)
|
||||
return slice(array, 0, n < 0 ? 0 : n)
|
||||
}
|
||||
|
||||
export default take
|
||||
|
||||
Reference in New Issue
Block a user