Because I still working on glob-fs idea :D lol
Actually it works on 80% of the common usage of gulp/glob-stream, fails only on complex fixtures, or no logical tests (look at you glob-stream, nah.. it have very very weird tests).
Btw, talking about that, can you answer me why is needed to ignore negate glob if it is first in given patterns?!
No logic for me... nor of matching libs (micromatch/minimatch/node-glob) have this behaving.. lol.
On topic
var micromatch = require('micromatch')
var multimatch = require('multimatch')
var paths = [
'foo/',
'foo/bar.js',
'foo/bar.md',
'foo/bar.txt',
'foo/bar.hbs',
'foo/bar.json',
'foo/bar.coffee',
'foo/bar/',
'foo/bar/bar.js',
'foo/bar/bar.md',
'foo/bar/bar.txt',
'foo/bar/bar.hbs',
'foo/bar/bar.json',
'foo/bar/bar.coffee',
];
var patterns = [
'foo/**',
'!foo/',
'!foo/bar/',
'!foo/bar/*.{j*,txt,hbs}',
'foo/bar/*.json',
];
var res = micromatch(paths, patterns);
console.log(res, res.length);
micromatch, note there foo/bar/bar.json
missing
[ 'foo/bar.js',
'foo/bar.md',
'foo/bar.txt',
'foo/bar.hbs',
'foo/bar.json',
'foo/bar.coffee',
'foo/bar/bar.md',
'foo/bar/bar.coffee' ] 8
multimatch, all is okey
[ 'foo/bar.js',
'foo/bar.md',
'foo/bar.txt',
'foo/bar.hbs',
'foo/bar.json',
'foo/bar.coffee',
'foo/bar/bar.md',
'foo/bar/bar.coffee',
'foo/bar/bar.json' ] 9