Fixes, and made firegex responsive
This commit is contained in:
@@ -160,15 +160,9 @@ export function okNotify(title:string, description:string ){
|
||||
}
|
||||
|
||||
export function validateRegex(pattern:string) {
|
||||
var parts = pattern.split('/'),
|
||||
regex = pattern,
|
||||
options = "";
|
||||
if (parts.length > 1) {
|
||||
regex = parts[1];
|
||||
options = parts[2];
|
||||
}
|
||||
return true; // TO TEST
|
||||
try {
|
||||
new RegExp(regex, options);
|
||||
new RegExp(pattern);
|
||||
return true;
|
||||
}
|
||||
catch(e) {
|
||||
@@ -178,4 +172,4 @@ export function validateRegex(pattern:string) {
|
||||
|
||||
export function b64encode(data:string){
|
||||
return Buffer.from(data).toString('base64')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user