diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2020-07-14 15:24:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 15:24:17 -0400 |
commit | cde4dbb35132848ffece59ef9cfaccff32347124 (patch) | |
tree | cc7830968c6decde704c8cfb83c9185193dc698f /std/path/_globrex.ts | |
parent | 9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff) |
Use dprint for internal formatting (#6682)
Diffstat (limited to 'std/path/_globrex.ts')
-rw-r--r-- | std/path/_globrex.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/std/path/_globrex.ts b/std/path/_globrex.ts index 6ad297d86..0cc5399fa 100644 --- a/std/path/_globrex.ts +++ b/std/path/_globrex.ts @@ -57,7 +57,7 @@ export function globrex( strict = false, filepath = false, flags = "", - }: GlobrexOptions = {} + }: GlobrexOptions = {}, ): GlobrexResult { const sepPattern = new RegExp(`^${SEP}${strict ? "" : "+"}$`); let regex = ""; @@ -82,7 +82,7 @@ export function globrex( // Helper function to build string and segments function add( str: string, - options: AddOptions = { split: false, last: false, only: "" } + options: AddOptions = { split: false, last: false, only: "" }, ): void { const { split, last, only } = options; if (only !== "path") regex += str; @@ -279,8 +279,7 @@ export function globrex( add(".*"); } else { // globstar is enabled, so determine if this is a globstar segment - const isGlobstar = - starCount > 1 && // multiple "*"'s + const isGlobstar = starCount > 1 && // multiple "*"'s // from the start of the segment [SEP_RAW, "/", undefined].includes(prevChar) && // to the end of the segment @@ -320,7 +319,7 @@ export function globrex( segments: pathSegments, globstar: new RegExp( !flags.includes("g") ? `^${GLOBSTAR_SEGMENT}$` : GLOBSTAR_SEGMENT, - flags + flags, ), }; } |