const shouldBundle = passedFiles.some(glob => { return minimatch(jsPath, glob) || minimatch(jsTestPath, glob); });
function valid (file) { // header files return minimatch(file, '*.h', { matchBase: true }) || minimatch(file, '*.gypi', { matchBase: true }) }
var matches = packageConfig.ignore.some(function (pattern) { return minimatch(file, pattern) })
this._enabled = fileGlobs.some(p => minimatch(relativeFilePath, p));
return _.any(patterns, function(p) { return minimatch(f.pattern, p); });
return this._patterns.find((pattern) => mm(path, pattern.pattern))
oks.forEach(function (ok) { t.ok(+minimatch(ok, p), '"' + p + '" =~ "' + ok + '"'); });
return patterns.some((pattern) => mm(path, pattern, {dot: true}))
loaderConfig.nodeInstrumenter = function (contents, source) { return minimatch(source, _tests_glob) ? contents // don't instrument tests itself : instrumenter.instrumentSync(contents, source); };
return patternList.some(pattern => minimatch(filePath, pattern, opts)) &&
!excludedPatternList.some(excludedPattern => minimatch(filePath, excludedPattern, opts));
function valid (file) { // header files return minimatch(file, '*.h', { matchBase: true }) || // non-legacy versions of node also extract the gyp build files (!isLegacy && minimatch(file, '*.gypi', { matchBase: true })) }
if (config.dontLoad && config.dontLoad.some(function(pat) { return minimatch(name, pat); })) {
ignoreRules.forEach(rule => { if (minimatch(details.modulePath, rule, matchOptions)) { details.ignored = true; details.resolved = false; } });
return function(client, topic, cb) { cb(null, minimatch(topic, that.users[client.user].authorizeSubscribe)); };
function convertFile(file, ext, args, files, results) { if (minimatch(file, args.src)) { if (results[file]) return; var nameData = {}; if (ext === '.__source__') { nameData['%e'] = ext = path.extname(file); } else { nameData['%e'] = ext; } if(!!args.rename_only) { im.convert = function(convertArgs) { return convertArgs.srcData; }; } var convertArgs = { srcData: files[file].contents, format: ext.substr(1), strip: true, quality: 90 }; var currentExt = path.extname(file); nameData['%b'] = path.basename(file, currentExt); // Pass options to imagemagick-native [ 'density', 'blur', 'rotate', 'flip', 'strip', 'quality', 'gravity' ].forEach(function (setting) { if (args.hasOwnProperty(setting)) { convertArgs[setting] = args[setting]; } }); if (args.resize) { convertArgs['width'] = args.resize.width; convertArgs['height'] = args.resize.height; nameData['%x'] = args.resize.width; nameData['%y'] = args.resize.height; convertArgs['resizeStyle'] = args.resize.resizeStyle; debug("Resizing (" + args.resize.width + "x" + args.resize.height + ")"); } else { var info = im.identify({srcData: files[file].contents}); nameData['%x'] = info.width; nameData['%y'] = info.height; } var newName = assembleFilename(args.nameFormat, nameData); debug("New name is " + newName); newName = path.join(path.dirname(file), newName); var result = im.convert(convertArgs); if (args.renameSourceFormat) { var rename = assembleFilename(args.renameSourceFormat, nameData); rename = path.join(path.dirname(file), rename); files[rename] = files[file]; delete files[file]; } files[newName] = { contents: result }; results[newName] = true; if (args.remove) { delete files[file]; } } }
return this._excludes.find((pattern) => mm(path, pattern))
var inIncludes = includes && includes.some(function(include) { return minimatch(file, include, { matchBase: true }); })
return !!this._patterns.find((pattern) => mm(path, pattern.pattern) && this._findFile(path, pattern))
var inExcludes = excludes.some(function(exclude) { return minimatch(file, exclude, { matchBase: true }); })
ngs.forEach(function (ng) { t.ok(!minimatch(ng, p), '"' + p + '" !~ "' + ng + '"'); });
_.forEach(instrumenterOverrides, function (literal, pattern) { if (minimatch(file.originalPath, pattern, {dot: true})) { instrumenterLiteral = String(literal) } })
good = good.filter(function(file) { return minimatch(file, ext); });
return IGNORE_FILES.some(function (pattern) { return minimatch(file, pattern); });
const test = rule => minimatch(rpath, rule);
/** * Check if `file` matches `pattern`. * * @example * match('baz.md', '*.md'); // true * * @param {string} filePath - File location. * @param {string} pattern - Glob pattern. * @return {boolean} - Whether `file` matches. */ function match(filePath, pattern) { return minimatch(filePath, pattern) || minimatch(filePath, pattern + '/**'); }
good = good.filter(function(file) { // only compare the filename to the extension test, so we use path.basename return minimatch(path.basename(file), ext); });
return function(client, topic, payload, cb) { cb(null, minimatch(topic, that.users[client.user].authorizePublish)); };
return any(Blueprint.ignoredFiles, function (ignoredFile) { return minimatch(fn, ignoredFile, { matchBase: true }); });
paths.forEach(function (path) { valid = minimatch(currentUrl, path); });