mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Remove coercion method use.
This commit is contained in:
2
take.js
2
take.js
@@ -1,5 +1,4 @@
|
||||
import baseSlice from './.internal/baseSlice.js'
|
||||
import toInteger from './toInteger.js'
|
||||
|
||||
/**
|
||||
* Creates a slice of `array` with `n` elements taken from the beginning.
|
||||
@@ -27,7 +26,6 @@ function take(array, n=1) {
|
||||
if (!(array != null && array.length)) {
|
||||
return []
|
||||
}
|
||||
n = toInteger(n)
|
||||
return baseSlice(array, 0, n < 0 ? 0 : n)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user