Skip to content

Commit a04fb96

Browse files
committed
remove redundant RegExp cast
1 parent 2f15f61 commit a04fb96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/utils/src/string.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function isMatchingPattern(value: string, pattern: RegExp | string): bool
9494
}
9595

9696
if (isRegExp(pattern)) {
97-
return (pattern as RegExp).test(value);
97+
return pattern.test(value);
9898
}
9999
if (typeof pattern === 'string') {
100100
return value.indexOf(pattern) !== -1;

0 commit comments

Comments
 (0)