From abb246eb36828588fa90429edce0d1bf733ca4bf Mon Sep 17 00:00:00 2001 From: cenfun Date: Sat, 7 Dec 2024 16:23:34 +0800 Subject: [PATCH] support * for pattern --- lib/utils/util.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/utils/util.js b/lib/utils/util.js index 846d2eb..aea1bf0 100644 --- a/lib/utils/util.js +++ b/lib/utils/util.js @@ -175,6 +175,10 @@ const Util = { str = `${str}`; pattern = `${pattern}`; + if (pattern === '*') { + return true; + } + // includes first if (str.includes(pattern)) { return true;