From ffffccfdf10a3f5f1bb85ef0e512bc4866427b19 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sat, 19 Oct 2024 18:34:48 +0100 Subject: [PATCH] refactor(lib/find-plugins): replace regexp `.exec()` with `.test()` (#417) --- lib/find-plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/find-plugins.js b/lib/find-plugins.js index 631d870..88338de 100644 --- a/lib/find-plugins.js +++ b/lib/find-plugins.js @@ -87,7 +87,7 @@ function processIndexDirEntryIfExists (pluginTree, { opts, dirEntries, dir, pref async function processDirContents (pluginTree, { dirEntries, opts, indexDirEntry, prefix, dir, depth, currentDirHooks }) { for (const dirEntry of dirEntries) { - if (opts.ignorePattern && RegExp(opts.ignorePattern).exec(dirEntry.name)) { + if (opts.ignorePattern && RegExp(opts.ignorePattern).test(dirEntry.name)) { continue }