Skip to content

Commit

Permalink
Define unified glob fn
Browse files Browse the repository at this point in the history
  • Loading branch information
nafarlee committed Dec 6, 2023
1 parent b4ba7c2 commit 577c85c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ function memGlob(patterns, source) {
return micromatch(source, patterns);
}

function glob(patterns, source = null) {
return source ? memGlob(patterns, source) : fsGlob(patterns);
}

async function directMatch(patterns) {
const matches = await fsGlob(patterns);
core.debug(JSON.stringify({ patterns, matches }, null, 2));
Expand Down

0 comments on commit 577c85c

Please sign in to comment.