1
0

remove.js 321 B

123456789101112
  1. 'use strict';
  2. var indexOf = require('./e-index-of')
  3. , forEach = Array.prototype.forEach, splice = Array.prototype.splice;
  4. module.exports = function (item/*, …item*/) {
  5. forEach.call(arguments, function (item) {
  6. var index = indexOf.call(this, item);
  7. if (index !== -1) splice.call(this, index, 1);
  8. }, this);
  9. };