Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 739 Bytes

.verb.md

File metadata and controls

31 lines (22 loc) · 739 Bytes

Usage

var ignore = require('{%= name %}');
var Base = require('base');
var app = new Base();

// register plugin
app.use(ignore());

Example

var mm = require('micromatch');

var arr = ['node_modules/foo/index.js', 'foo.js', 'bar.txt'];
console.log(mm(arr, '**/*.js'));
//=> ['node_modules/foo/index.js', 'foo.js'];

var arr = ['node_modules/foo/index.js', 'foo.js', 'bar.txt'];
console.log(mm(arr, '**/*.js', {ignore: app.ignore()}));
//=> ['foo.js'];

Caching

Patterns in .gitignore are parsed and converted to glob patterns and the converted patterns are cached. This is useful in applications that need to potentially match against the same set of files repeatedly.

API

{%= apidocs("index.js") %}