NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/@antv/util/lib/array/pull.js
2023-09-14 14:47:11 +08:00

18 lines
453 B
JavaScript

var arrPrototype = Array.prototype;
var splice = arrPrototype.splice;
var indexOf = arrPrototype.indexOf;
var slice = arrPrototype.slice;
var pull = function pull(arr) {
var values = slice.call(arguments, 1);
for (var i = 0; i < values.length; i++) {
var value = values[i];
var fromIndex = -1;
while ((fromIndex = indexOf.call(arr, value)) > -1) {
splice.call(arr, fromIndex, 1);
}
}
return arr;
};
module.exports = pull;