mirror of
https://github.com/status-im/github-webhook-filter.git
synced 2026-08-27 16:51:29 +00:00
fix: use replaceAll
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ export function wildcardMatch(pattern: string, target: string): boolean {
|
||||
// escape everything else
|
||||
pattern = pattern.split("*").map(_escapeRegex).join(".*");
|
||||
// treat `,` as `|`
|
||||
pattern = pattern.replace(",", "|");
|
||||
pattern = pattern.replaceAll(",", "|");
|
||||
// add anchors
|
||||
pattern = `^(${pattern})$`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user