We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22c9587 commit c856d4cCopy full SHA for c856d4c
src/lib/query.ts
@@ -25,10 +25,16 @@ export class Query extends BaseQuery {
25
}
26
// Validate if input is a valid regex pattern
27
private isValidRegexPattern(input: string): boolean {
28
- RegExp(input);
29
- return true;
+ try {
+ RegExp(input)
30
+ return true;
31
-
32
+ catch {
33
+ return false;
34
+ }
35
+
36
37
38
// Validate if value is an array of strings, numbers, or booleans
39
private isValidValue(value: any[]): boolean {
40
return Array.isArray(value) && value.every(item => typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean');
0 commit comments