diff --git a/lib/src/filterSince.js b/lib/src/filterSince.js deleted file mode 100644 index 803091a5..00000000 --- a/lib/src/filterSince.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var through2 = require('through2'); - -function filterSince(since) { - return through2.obj(filter(since)); -} - -function filter(since) { - return function(file, enc, cb) { - if (since < file.stat.mtime) { - return cb(null, file); - } - cb(); - }; -} - -module.exports = filterSince; diff --git a/lib/src/index.js b/lib/src/index.js index 6362e4af..1f2616b1 100644 --- a/lib/src/index.js +++ b/lib/src/index.js @@ -7,7 +7,7 @@ var File = require('vinyl'); var duplexify = require('duplexify'); var merge = require('merge-stream'); -var filterSince = require('./filterSince'); +var filterSince = require('vinyl-filter-since'); var getContents = require('./getContents'); var resolveSymlinks = require('./resolveSymlinks'); diff --git a/package.json b/package.json index 488b1fa4..4f738ade 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "object-assign": "^2.0.0", "strip-bom": "^1.0.0", "through2": "^0.6.1", - "vinyl": "^0.4.0" + "vinyl": "^0.4.0", + "vinyl-filter-since": "^1.0.0" }, "devDependencies": { "buffer-equal": "^0.0.1",