| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 1 3 3 1 | define(['./indexOf'], function(indexOf){
/**
* Remove a single item from the array.
* (it won't remove duplicates, just a single item)
* @version 0.1.1 (2012/03/13)
*/
function remove(arr, item){
var idx = indexOf(arr, item);
if (idx !== -1) arr.splice(idx, 1);
}
return remove;
});
|