documentcloud / underscore-contrib

The brass buckles on Underscore's utility belt
MIT License
621 stars 117 forks source link

Insert function for arrays #199

Open acarrau opened 9 years ago

acarrau commented 9 years ago

I thought an 'insert item at' function for arrays would be nice to have, avoiding the use of splice where 0 needs to be passed as the 2nd 'deleteCount' parameter.

It works the same way the _.extend function does, where the first parameter gets modified and the result is also returned.