forked from github.com/GenderDysphoria.fyi
Initial site commit
This commit is contained in:
18
gulp/lib/filter.js
Normal file
18
gulp/lib/filter.js
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
const filter = require('gulp-filter');
|
||||
|
||||
module.exports = exports = function filter2 (pattern, options) {
|
||||
if (pattern instanceof RegExp) {
|
||||
return filter((file) => pattern.test(file.path), options);
|
||||
}
|
||||
|
||||
return filter(pattern, options);
|
||||
};
|
||||
|
||||
exports.not = function notfilter2 (pattern, options) {
|
||||
if (pattern instanceof RegExp) {
|
||||
return filter((file) => !pattern.test(file.path), options);
|
||||
}
|
||||
|
||||
throw new Error('filter.not only takes regular expressions');
|
||||
};
|
||||
Reference in New Issue
Block a user