summaryrefslogtreecommitdiff
path: root/std/fs/expand_glob.ts
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2020-07-14 15:24:17 -0400
committerGitHub <noreply@github.com>2020-07-14 15:24:17 -0400
commitcde4dbb35132848ffece59ef9cfaccff32347124 (patch)
treecc7830968c6decde704c8cfb83c9185193dc698f /std/fs/expand_glob.ts
parent9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff)
Use dprint for internal formatting (#6682)
Diffstat (limited to 'std/fs/expand_glob.ts')
-rw-r--r--std/fs/expand_glob.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/std/fs/expand_glob.ts b/std/fs/expand_glob.ts
index 8a4b0ed03..6d1f883b5 100644
--- a/std/fs/expand_glob.ts
+++ b/std/fs/expand_glob.ts
@@ -77,7 +77,7 @@ export async function* expandGlob(
includeDirs = true,
extended = false,
globstar = false,
- }: ExpandGlobOptions = {}
+ }: ExpandGlobOptions = {},
): AsyncIterableIterator<WalkEntry> {
const globOptions: GlobOptions = { extended, globstar };
const absRoot = isAbsolute(root)
@@ -110,7 +110,7 @@ export async function* expandGlob(
async function* advanceMatch(
walkInfo: WalkEntry,
- globSegment: string
+ globSegment: string,
): AsyncIterableIterator<WalkEntry> {
if (!walkInfo.isDirectory) {
return;
@@ -135,7 +135,7 @@ export async function* expandGlob(
match: [
globToRegExp(
joinGlobs([walkInfo.path, globSegment], globOptions),
- globOptions
+ globOptions,
),
],
skip: excludePatterns,
@@ -156,12 +156,12 @@ export async function* expandGlob(
}
if (hasTrailingSep) {
currentMatches = currentMatches.filter(
- (entry: WalkEntry): boolean => entry.isDirectory
+ (entry: WalkEntry): boolean => entry.isDirectory,
);
}
if (!includeDirs) {
currentMatches = currentMatches.filter(
- (entry: WalkEntry): boolean => !entry.isDirectory
+ (entry: WalkEntry): boolean => !entry.isDirectory,
);
}
yield* currentMatches;
@@ -184,7 +184,7 @@ export function* expandGlobSync(
includeDirs = true,
extended = false,
globstar = false,
- }: ExpandGlobOptions = {}
+ }: ExpandGlobOptions = {},
): IterableIterator<WalkEntry> {
const globOptions: GlobOptions = { extended, globstar };
const absRoot = isAbsolute(root)
@@ -217,7 +217,7 @@ export function* expandGlobSync(
function* advanceMatch(
walkInfo: WalkEntry,
- globSegment: string
+ globSegment: string,
): IterableIterator<WalkEntry> {
if (!walkInfo.isDirectory) {
return;
@@ -242,7 +242,7 @@ export function* expandGlobSync(
match: [
globToRegExp(
joinGlobs([walkInfo.path, globSegment], globOptions),
- globOptions
+ globOptions,
),
],
skip: excludePatterns,
@@ -263,12 +263,12 @@ export function* expandGlobSync(
}
if (hasTrailingSep) {
currentMatches = currentMatches.filter(
- (entry: WalkEntry): boolean => entry.isDirectory
+ (entry: WalkEntry): boolean => entry.isDirectory,
);
}
if (!includeDirs) {
currentMatches = currentMatches.filter(
- (entry: WalkEntry): boolean => !entry.isDirectory
+ (entry: WalkEntry): boolean => !entry.isDirectory,
);
}
yield* currentMatches;