const dealArray = (arr, obj) => {
Array.prototype.S = String.fromCharCode(2);
Array.prototype.in_array = function (e) {
var r = new RegExp(this.S + e + this.S);
return (r.test(this.S + this.join(this.S) + this.S));
};
return (arr.in_array(obj))
}
原文:https://www.cnblogs.com/wwj007/p/11851526.html