0.0.2 • Published 9 years ago
glob-escape v0.0.2
glob-escape
Escapes glob patterns. Works for packages like minimatch, multimatch, glob, glob-stream, globby, vinyl-fs and gulp.
Installation
npm install glob-escapeUsage
var escapeGlob = require('glob-escape');
var glob = require('glob');
glob('algorithms/a*.txt', function(err, array) {
// array might contain several files like:
// - algorithms/a*.txt
// - algorithms/alpha-beta_pruning.txt
// - algorithms/augmented_lagrangian_method.txt
});
glob(escapeGlob('algorithms/a*.txt'), function(err, array) {
// array will only contain one file:
// - algorithms/a*.txt
});API
escapeGlob(glob)
Escapes all glob patterns in the provided glob.
glob may be a string or an array of strings.
Returns the escaped glob.