UNIX globbing (wildcard matching) for javascript
var glob= require('./glob').glob;
glob.match('pattern', 'string') // ...
<script src="glob.js"></script>
<script>
window.glob.match('pattern', 'string') // ...
</script>
glob.match('ab?d', 'abcd') // ok
glob.match('ab\\?d', 'ab?d') // ok
glob.match('ab*d', 'abcaeg@3d') // ok
glob.match('ab\\*d', 'ab*d') // ok
glob.match('ab[cd]e', 'abce') // ok
glob.match('ab\\nc', 'abnc') // ok
glob.match('ab\\mc', 'abmc') // ok
glob.match("ab?c*[df]\\d|.q", 'ab1c234fd|.q') // ok
bower install glob.js