fast-filter
A replacement for the native [].filter
method that performs 5-10 times faster in most environments.
Install
npm install fast-filter
Basic usage
var fastFilter = ; ; // [1,3,5]
"Installing" on the Array.prototype
You can add fastFilter
to the native Array.prototype
for convienience.
; 123456; // [1,3,5]
Or provide an alias:
; 123456; // [1,3,5]
filter
method
Replacing the native You can replace the native Array.prototype.filter
method, but keep in mind that this will modify the filter
method for all code in this instance including any required modules and may result in unexpected behavior.
; 123456; // [1,3,5]