andrewplummer / Sugar

A Javascript library for working with native objects.
https://sugarjs.com/
MIT License
4.54k stars 305 forks source link

Add overloads for Array.first() and Array.last() #671

Open phil-martin opened 3 years ago

phil-martin commented 3 years ago

Makes it easier in typescript to get the first or last N elements of an array without having to cast to the 'any' type as a workaround.