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
> Filter files in a [vinyl](https://github.com/wearefractal/vinyl) stream
3
+
> Filter files in a [Vinyl](https://github.com/gulpjs/vinyl) stream
4
4
5
-
Enables you to work on a subset of the original files by filtering them using globbing. When you're done and want all the original files back you just use the `restore` stream.
5
+
Enables you to work on a subset of the original files by filtering them using glob patterns. When you're done and want all the original files back you just use the `restore` stream.
Returns a [transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) with a [.restore](#optionsrestore)object.
117
+
Returns a [transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) with a [.restore](#optionsrestore)property.
118
118
119
119
#### pattern
120
120
121
-
Type: `string`, `array`, `function`
121
+
Type: `string``Array``Function`
122
122
123
123
Accepts a string/array with globbing patterns which are run through [multimatch](https://github.com/sindresorhus/multimatch).
124
124
125
-
If you supply a function you'll get a [vinyl file object](https://github.com/wearefractal/vinyl#file) as the first argument and you're expected to return true/false whether to include the file:
125
+
If you supply a function, you'll get a [vinyl file object](https://github.com/wearefractal/vinyl#file) as the first argument and you're expected to return a boolean of whether to include the file:
*Note:* Set `dot: true` if you need to match files prefixed with a dot (eg. `.gitignore`).
137
+
*Note:* Set `dot: true` if you need to match files prefixed with a dot (e.g. `.gitignore`).
138
138
139
-
####options.restore
139
+
##### restore
140
140
141
141
Type: `boolean`<br>
142
142
Default: `false`
143
143
144
144
Restore filtered files.
145
145
146
-
####options.passthrough
146
+
##### passthrough
147
147
148
148
Type: `boolean`<br>
149
149
Default: `true`
150
150
151
-
When set to `true` filtered files are restored with a PassThrough stream, otherwise, when set to `false`, filtered files are restored as a Readable stream.
151
+
When set to `true`, filtered files are restored with a `PassThrough` stream, otherwise, when set to `false`, filtered files are restored as a `ReadableStream`.
152
152
153
-
When the stream is Readable it ends by itself, but when PassThrough, you are responsible of ending the stream.
153
+
When the stream is a `ReadableStream`, it ends by itself, but when it's `PassThrough`, you are responsible of ending the stream.
0 commit comments