1
0
forked from keinBot/cuffeo

dynamic modimport in ircmodule

This commit is contained in:
Flummi
2019-08-21 10:07:25 +00:00
parent 19782dd6f8
commit 267d8cf798
3 changed files with 57 additions and 85 deletions

View File

@@ -38,3 +38,28 @@ export default class cuffeo extends EventEmitter {
});
}
};
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);
};