Skip to content

Commit 22c9587

Browse files
committed
Minor changes done
1 parent 5c24c19 commit 22c9587

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/lib/query.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ export class Query extends BaseQuery {
2525
}
2626
// Validate if input is a valid regex pattern
2727
private isValidRegexPattern(input: string): boolean {
28-
try {
29-
new RegExp(input);
30-
return true;
31-
} catch (error) {
32-
return false;
28+
RegExp(input);
29+
return true;
3330
}
34-
}
31+
3532
// Validate if value is an array of strings, numbers, or booleans
3633
private isValidValue(value: any[]): boolean {
3734
return Array.isArray(value) && value.every(item => typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean');

0 commit comments

Comments
 (0)