The docs for A.take state:
|
/** Returns a new array including the first `n` elements of the provided array, or an empty array if `n` is either negative or greater than the length of the provided array. */ |
however if n is greater than the length of the array, the whole array is returned instead of an empty array.
for example:
console.log(A.take([1, 2, 3], 10));
logs [ 1, 2, 3 ] whereas it should log [].
when using a negative n this does correctly print out an empty array.
for example:
console.log(A.take([1, 2, 3], -10));
logs [].