From f075cd50d3c5c9f7b4ce688f31fa7dea404eaf47 Mon Sep 17 00:00:00 2001 From: shiftinv Date: Fri, 21 Oct 2022 22:13:36 +0200 Subject: [PATCH] fix: use replaceAll --- lib/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.ts b/lib/util.ts index b415ed5..796b711 100644 --- a/lib/util.ts +++ b/lib/util.ts @@ -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})$`;