Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mi.match = function(files, pattern, options) {
return minimatch.match(utils.arrayify(files), pattern, options);
};
} else if (pattern instanceof RegExp) {
return arrayUnion(ret, list.filter(function(item) {
return pattern.test(item);
}));
} else {
var process = arrayUnion;
if (pattern[0] === '!') {
pattern = pattern.slice(1);
process = arrayDiffer;
}
return process(ret, minimatch.match(list, pattern, options));
}
}, []);
};
argvModules.forEach((moduleEntry) => {
let modulePattern = path.join(moduleEntry.replace(/(\*)+$/ig, '').replace(/^client/, ''), '**/*.{js,jsx,ts,tsx}');
modulePattern = ['./', path.join('client', modulePattern)].join('');
for (const key in allModules) {
const matched = minimatch.match(ensureHasDotExtension(allModules[key]), modulePattern, { matchBase: true });
if (matched.length) {
newEntries[key] = matched;
}
}
});
return newEntries;
return processPatterns(patterns, function(pattern) {
return minimatch.match(filepaths, pattern, options);
}.bind(this));
};
return patterns.reduce((result, pattern) => {
let process = arrayUnion;
if (pattern[0] === '!') {
pattern = pattern.slice(1);
process = arrayDiffer;
}
return process(result, minimatch.match(list, pattern, options));
}, []);
};
module.exports = function(files, pattern) {
return minimatch.match(files, pattern);
};
_.each( filter, function( pattern ) {
var matches = minimatch.match( list, pattern, { matchBase: true, dot: true } );
exclusions = exclusions.concat( matches );
} );
return _.without( list, exclusions );
patterns.forEach(pattern => {
intersection = [
...intersection,
...minimatch.match(files, pattern, {matchBase: true}),
];
});
return [...new Set(intersection)];
module.exports = function(files, pattern) {
files = Array.isArray(files) ? files : [files];
return minimatch.match(files, pattern).length > 0;
};