deno_std
deno_std copied to clipboard
Allow passing array of globs to `expandGlob`/`expandGlobSync`
Is your feature request related to a problem? Please describe.
I'm creating an API which will take in an include
and exclude
array of files. Wanted to mirror APIs like the one typically used in tsconfig. Currently I have to run an expandGlob
for every member of my include
array.
expandGlob
already allows an exclude
option which takes in an array, so it seems a bit odd to me that is not the case for the input glob
itself.
Describe the solution you'd like
Ideally, I'd like to simply pass an array of globs into expandGlob
. Something like this:
expandGlob(glob: string | string[] | URL, options: ExpandGlobOptions)
Describe alternatives you've considered
-
Add
include
into options - This doesn't seem correct though, sinceglob
is essentiallyinclude
, but with one item. - Create a new separate function specifically for glob arrays - Open to this if it will completely change the mechanism, but it seems less than ideal to me