Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement expandGlob() #617

Merged
merged 20 commits into from
Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ async function main(opts): Promise<void> {
"--ignore",
"node_modules",
"--ignore",
"testdata",
"**/testdata",
"--ignore",
"vendor",
"**/vendor",
"--write"
];

Expand Down
8 changes: 4 additions & 4 deletions fs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,16 @@ exists("./foo"); // returns a Promise<boolean>
existsSync("./foo"); // returns boolean
```

### glob
### globToRegExp

Generate a regex based on glob pattern and options
This was meant to be using the the `fs.walk` function
but can be used anywhere else.

```ts
import { glob } from "https://deno.land/std/fs/mod.ts";
import { globToRegExp } from "https://deno.land/std/fs/mod.ts";

glob("foo/**/*.json", {
globToRegExp("foo/**/*.json", {
flags: "g",
extended: true,
globstar: true
Expand Down Expand Up @@ -160,7 +160,7 @@ Iterate all files in a directory recursively.
```ts
import { walk, walkSync } from "https://deno.land/std/fs/mod.ts";

for (const fileInfo of walkSync()) {
for (const fileInfo of walkSync(".")) {
console.log(fileInfo.filename);
}

Expand Down
Loading