summaryrefslogtreecommitdiff
path: root/std/fs
diff options
context:
space:
mode:
Diffstat (limited to 'std/fs')
-rw-r--r--std/fs/expand_glob.ts25
1 files changed, 13 insertions, 12 deletions
diff --git a/std/fs/expand_glob.ts b/std/fs/expand_glob.ts
index 72907e157..db60b2465 100644
--- a/std/fs/expand_glob.ts
+++ b/std/fs/expand_glob.ts
@@ -60,15 +60,17 @@ function comparePath(a: WalkEntry, b: WalkEntry): number {
return 0;
}
-/**
- * Expand the glob string from the specified `root` directory and yield each
+/** Expand the glob string from the specified `root` directory and yield each
* result as a `WalkEntry` object.
*
- * Examples:
+ * See [`globToRegExp()`](../path/glob.ts#globToRegExp) for details on supported
+ * syntax.
*
- * for await (const file of expandGlob("**\/*.ts")) {
- * console.log(file);
- * }
+ * Example:
+ *
+ * for await (const file of expandGlob("**\/*.ts")) {
+ * console.log(file);
+ * }
*/
export async function* expandGlob(
glob: string,
@@ -168,14 +170,13 @@ export async function* expandGlob(
yield* currentMatches;
}
-/**
- * Synchronous version of `expandGlob()`.
+/** Synchronous version of `expandGlob()`.
*
- * Examples:
+ * Example:
*
- * for (const file of expandGlobSync("**\/*.ts")) {
- * console.log(file);
- * }
+ * for (const file of expandGlobSync("**\/*.ts")) {
+ * console.log(file);
+ * }
*/
export function* expandGlobSync(
glob: string,