This commit is contained in:
Flummi
2018-11-13 07:53:15 +01:00
parent 14b918b8af
commit 323e51ece6
5 changed files with 23 additions and 72 deletions

View File

@ -47,3 +47,26 @@ const wrapper = class wrapper extends EventEmitter {
};
export { wrapper, clients };
Map.prototype.hasi = function(val) {
try {
for (let [key] of this)
if(key.toLowerCase() === val.toLowerCase())
return true;
return false;
} catch(err) {
console.log("das übliche mit tolowercase()");
return false;
}
};
Map.prototype.geti = function(val) {
for (let [key, value] of this)
if(key.toLowerCase() === val.toLowerCase())
return value;
return false;
};
Map.prototype.deli = function(val) {
for (let [key] of this)
if(key.toLowerCase() === val.toLowerCase())
this.delete(key);
};