You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If set to `true`, `globby` will automatically glob directories for you. If you define an `Array` it will only glob files that matches the patterns inside the `Array`. You can also define an `Object` with `files` and `extensions` like in the example below.
Note that if you set this option to `false`, you won't get back matched directories unless you set `onlyFiles: false`.
@@ -105,16 +103,14 @@ Returns `string[]` of matching paths.
105
103
106
104
Returns a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_readable_streams) of matching paths.
107
105
108
-
Since Node.js 10, [readable streams are iterable](https://nodejs.org/api/stream.html#stream_readable_symbol_asynciterator), so you can loop over glob matches in a [`for await...of` loop](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of) like this:
106
+
For example, loop over glob matches in a [`for await...of` loop](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of) like this:
109
107
110
108
```js
111
109
import {globbyStream} from'globby';
112
110
113
-
(async () => {
114
-
forawait (constpathofglobbyStream('*.tmp')) {
115
-
console.log(path);
116
-
}
117
-
})();
111
+
forawait (constpathofglobbyStream('*.tmp')) {
112
+
console.log(path);
113
+
}
118
114
```
119
115
120
116
### generateGlobTasks(patterns, options?)
@@ -169,12 +165,6 @@ Just a quick overview.
169
165
170
166
[Various patterns and expected matches.](https://github.com/sindresorhus/multimatch/blob/main/test/test.js)
171
167
172
-
## globby for enterprise
173
-
174
-
Available as part of the Tidelift Subscription.
175
-
176
-
The maintainers of globby and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-globby?utm_source=npm-globby&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
177
-
178
168
## Related
179
169
180
170
-[multimatch](https://github.com/sindresorhus/multimatch) - Match against a list instead of the filesystem
0 commit comments