HTML5, CSS3, jQuery, JSON, Responsive Design...

array.prototype.pureSplice npm package

Michael Brown  June 25 2016 11:22:42 PM
I've just released my seventh npm package, array.prototype.pureSplice().  FYI, my seven packages now have over 2, 000 downloads per month, combined.  Okay, that may not be in the same league as ReactJS (over 160,000 downloads per month) or AngularJS (over half a million downloads per month), but hey, it's a start!!!

So, pureSplice() is an array method to return a new array with a specified number of elements removed. Unlike JavaScript's native array.splice() method, array.pureSplice does not modify the source array. This is important if immutability of data is important to you and/or you are using libraries such as Redux.

Full instructions for use are on the array.prototype.pureSplice page on npmjs.com.  Also, a new feature on the npmjs site: you can now check how pureSplice() works in your browser, via Tonicdev.

About