4 lines
128 B
JavaScript
4 lines
128 B
JavaScript
import take from "../take.js";
|
|
export default function dropLast(n, xs) {
|
|
return take(n < xs.length ? xs.length - n : 0, xs);
|
|
} |