API Reference

Returns an array with a certain number of elements removed.

function shave(iterable: T[], n: number): T[]

// Example:

shave([1, 2, 3, 4], 2) //=> [1, 2]

shave([1, 2, 3, 4], -2) //=> [3, 4]

NOTE: By default elements are removed from the end. You can pass in a negative number to the n parameter remove them from the front