sindresorhus/gulp-filter — pull request #8 by mariocasciaro (2014-02-06 00:30:20+00:00)
Title: Fix filter.end, rename it to restore()

filter.end was not working as expected. This PR will fix it, will rename it to restore() (because the new method is attached directly to the Transform stream) and will also change its logic. Now filtered files are not buffered anywhere but they will be bypassed directly to the stream returned by restore().

This PR will break back compatibility for the usage of end() (but not for the main filter stream). Although end() was not working properly before, so the risk is mitigated.

Example usage is now:

```
var filter = gulpFilter('!src/vendor');

gulp.task('default', function () {
gulp.src('src/*.js')
// filter a subset of the files
.pipe(filter('!src/vendor'))
.pipe(filter)
// run them through a plugin
.pipe(jscs())
// bring back the previously filtered out files (optional)
.pipe(filter.end())
.pipe(filter.restore())
.pipe(gulp.dest('dist'));
});
```