title: gulp-filter is filtering everything
body: <p>gulp-filter is filtering everything.</p>
  
  <p>I'm trying to use <a href="https://www.npmjs.com/package/gulp-filter" rel="nofollow noreferrer">gulp-filter</a> to exclude a single file from <a href="https://www.npmjs.com/package/gulp-uglify/" rel="nofollow noreferrer">gulp-uglify</a>:</p>
  
  <pre class="lang-js prettyprint-override"><code>var uglify = require('gulp-uglify');
  var filter = require('gulp-filter');
  
  var paths = {
      css: 'src/*.css',
      html: 'src/*.html',
      js: 'src/*.js'
  };
  
  gulp.task('js', function() {
      // Create a filter for the ToC options file. We don't want to minify that.
      var f = filter(['*', '!src/ToCOptions.js'], {"restore": true});
  
      return gulp.src(paths.js)
          .pipe(f)
          .pipe(uglify())
          .pipe(f.restore)
          .pipe(gulp.dest('js'));
  });
  </code></pre>
  
  <p>I've read <a href="https://stackoverflow.com/q/24687468/2948042">gulp-filter filters out all files</a>, which seems to be the same problem, but the accepted answer doesn't work for me.</p>
  
  <p>I've tried several variations on the filter, including:</p>
  
  <ul>
  <li><code>var f = filter(['*', '!ToCOptions.js'], {"restore": true});</code><br>
  Nothing processed by gulp-uglify.</li>
  <li><code>var f = filter('!ToCOptions.js', {"restore": true});</code><br>
  Nothing processed by gulp-uglify.</li>
  <li><code>var f = filter('!src/ToCOptions.js', {"restore": true});</code><br>
  Nothing processed by gulp-uglify.</li>
  <li><code>var f = filter('src/ToCOptions.js', {"restore": true});</code><br>
  Only the file I wanted to exclude was processed by gulp-uglify.</li>
  <li><code>var f = filter(['*', 'src/ToCOptions.js'], {"restore": true});</code><br>
  Only the file I wanted to exclude was processed by gulp-uglify.</li>
  <li><code>var f = filter(['*', '!/src/ToCOptions.js'], {"restore": true});</code><br>
  Nothing processed by gulp-uglify.</li>
  <li><code>var f = filter(['*', '!/ToCOptions.js'], {"restore": true});</code><br>
  Nothing processed by gulp-uglify.</li>
  </ul>
  
  <p>What am I doing wrong?</p>