for some reason, when entering this into a console.log on a web browser, it STILL inserts a prototype :'3
function KeepOnly(){
delete this.__proto__;
this.properties = arguments[0];
this.arrKeep = arguments[1];
this.result = {};
for (this.i in this.properties)
for(this.j in this.arrKeep)
if (this.i == this.j)(
console.log(this.i + " : " + this.j),
this.result[this.i] = this.properties[this.i]
);
delete this.properties;
delete this.arrKeep;
delete this.i;
delete this.j;
return this.result;
}
function Splitter(){
//this.__proto__ = null;
delete this.__proto__;
this.stringy = arguments[0];
this.splitter = arguments[1];
this.matcher = arguments[2];
this.hold=[[]];
this.result = null;
for (this.i in this.stringy)
if (this.stringy[this.i] != this.splitter)
this.hold[this.hold.length - 1] += this.stringy[this.i];
else this.hold[this.hold.length] = [];
this.result = this.hold;
if (!!this.matcher)
for (this.i in this.hold)
if (this.hold[this.i] != this.matcher)
this.result = false;
else {
this.result = true;
break;
}
/*delete this.stringy;
delete this.splitter;
delete this.matcher;
delete this.hold;
delete this.i;
return this.result;*/
return new KeepOnly(this, ['result']);
}```
Any help would be appreciated! I tried moving ``this.__proto__`` around and even tried ``delete this.__proto__`` to no avail