-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
expose .hasMagic()
#36
Conversation
@@ -44,6 +44,12 @@ Returns an array of objects in the format `{ pattern: string, opts: Object }`, w | |||
|
|||
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration. | |||
|
|||
### globby.hasMagic(pattern, [options]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I'm unwilling to keep documentation in sync with node-globs
. Furthermore, it smells like plagiarism. As we don't modify behavior, I would suggest:
globby.hasMagic
See
node-glob
hasMagic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that would be much better.
Wasn't even sure if documenting it, was needed at all. Since the goal Extends glob with support for multiple patterns and exposes a Promise API
already implied it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note my #35 (comment), maybe we should modify the signature–sorry for the clutter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the ;
and change pattern
to patterns
.
Pull request updated.
|
@sindresorhus lgtm, I've manually verified v0.10 and v0.12. I'm willing to es2015ify before the next release, to drop support for v0.10 and v0.12. |
LGTM. |
Nah. Can just be inlined to |
@@ -44,6 +44,10 @@ Returns an array of objects in the format `{ pattern: string, opts: Object }`, w | |||
|
|||
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration. | |||
|
|||
### globby.hasMagic(patterns, [options]) | |||
|
|||
See `node-glob` [hasMagic](https://github.com/isaacs/node-glob#globhasmagicpattern-options). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be made clearer that it differentiates by supporting multiple patterns.
That allocates two extra array instances which may be unnecessary. I'm not sure if V8 is smart enough to optimize that, but I guess it doesn't really matter. Your call. |
Fixes #35.