Skip to content

Commit

Permalink
add missing src/matcher.mjs from template
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Jun 20, 2024
1 parent c58348e commit 434f755
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/matcher.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function nameExtensionMatcher(extensions) {
const r = new RegExp(
`(${extensions.map(x => x.replace(/\./, "\\.")).join("|")})$`
);
return entry => r.test(entry.name);
}

0 comments on commit 434f755

Please sign in to comment.