glob-ignore
v1.0.2
Published
Match files using the patterns the shell uses, like stars and stuff.
Downloads
735
Readme
glob-ignore
Match files using the patterns the shell uses, like stars and stuff.
Install
$ npm install --save glob-ignore
Usage
const glob = require('glob-ignore');
// same usage as node-glob
glob('**', function(err, res) { // async
if(err) throw err;
console.log(res);
});
glob('**'); // sync
glob('**', 'dir/to/filter/**'); // the second arg is a filter
glob(['a/**', 'b/**'], ['c/**', 'd/**']); // multiple patterns are allowed
Test and coverage
You just have to clone the repo and run
$ npm test
$ npm run coverage