Bug fixes and better regex checks

This commit is contained in:
DomySh
2022-06-15 08:47:13 +02:00
parent d2d2b2c408
commit 3ec0879608
5 changed files with 31 additions and 20 deletions

View File

@@ -159,17 +159,6 @@ export function okNotify(title:string, description:string ){
});
}
export function validateRegex(pattern:string) {
return true; // TO TEST
try {
new RegExp(pattern);
return true;
}
catch(e) {
return false;
}
}
export function b64encode(data:string){
return Buffer.from(data).toString('base64')
}