diff --git a/lib/filter.js b/lib/filter.js index eb07ca2..45d4dd2 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -63,6 +63,29 @@ module.exports = { }, options ); - } + }, + + + /** + * Filter local files without checking with remote, because it's much faster + * - use case: if the local repo is the source of truth + */ + filterLocalFiles: function ( folder, filter, options ) { + + options = this.makeOptions( options ); + + return this.parallel( function ( file, cb ) { + + filter( file, true, onFilter ); + + function onFilter( err, emit ) { + + cb( err, emit ? file : null ); + + } + + }, options ); + + }, };