UNPKG

bower

Version:

The browser package manager

16 lines (13 loc) 329 B
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; });