All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.bower.lib.node_modules.mout.src.array.removeAll.js Maven / Gradle / Ivy

define(['./indexOf'], function(indexOf){

    /**
     * Remove all instances of an item from array.
     */
    function removeAll(arr, item){
        var idx = indexOf(arr, item);
        while (idx !== -1) {
            arr.splice(idx, 1);
            idx = indexOf(arr, item, idx);
        }
    }

    return removeAll;
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy