summaryrefslogtreecommitdiff
path: root/std/path/glob.ts
diff options
context:
space:
mode:
authorNayeem Rahman <muhammed.9939@gmail.com>2020-02-06 22:25:39 +0000
committerGitHub <noreply@github.com>2020-02-06 17:25:39 -0500
commit971391dbaf8f5273eb2f16edd22b0c6cf694be46 (patch)
tree901a658522b9080221bb931c1504361c90ec8d18 /std/path/glob.ts
parent699d10bd9e5f19ad2f4ffb82225c86690a092c07 (diff)
fix(std/path/globrex.ts): Use non-capturing groups in globrex() (#3898)
Diffstat (limited to 'std/path/glob.ts')
-rw-r--r--std/path/glob.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/std/path/glob.ts b/std/path/glob.ts
index faccb8d77..daee22f98 100644
--- a/std/path/glob.ts
+++ b/std/path/glob.ts
@@ -38,9 +38,14 @@ export interface GlobToRegExpOptions extends GlobOptions {
*/
export function globToRegExp(
glob: string,
- options: GlobToRegExpOptions = {}
+ { extended = false, globstar = true }: GlobToRegExpOptions = {}
): RegExp {
- const result = globrex(glob, { ...options, strict: false, filepath: true });
+ const result = globrex(glob, {
+ extended,
+ globstar,
+ strict: false,
+ filepath: true
+ });
return result.path!.regex;
}