remove.js 172 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 module.exports = function remove(arr, item) { if (!arr) { return } for (var i=0; i<arr.length; i++) { if (arr[i] != item) { continue } arr.splice(i, 1) return } }