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

Added isGlob function #433

Merged
merged 4 commits into from
May 23, 2019
Merged

Added isGlob function #433

merged 4 commits into from
May 23, 2019

Conversation

dshubhadeep
Copy link
Contributor

In reference to issue #424

fs/glob.ts Outdated Show resolved Hide resolved
fs/glob_test.ts Outdated Show resolved Hide resolved
@@ -138,4 +138,120 @@ testWalk(
}
);

test({
name: "isGlob: pattern to test",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be some test cases testing that something is not glob, eg. assert(!isGlob("foo.js"));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test cases include both valid and invalid glob patterns,
I have used these test cases.

@kitsonk
Copy link
Contributor

kitsonk commented May 23, 2019

Is this an fs thing or a string thing? Glob patterns can be expressed in lots of other ways. Yes, they are mainly used to match lists of files, but they can also be used with URI matching too.

fs/glob.ts Outdated Show resolved Hide resolved
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit 94dcb27 into denoland:master May 23, 2019
ry pushed a commit to ry/deno that referenced this pull request Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants