How to use the multimatch.contains function in multimatch

To help you get started, we’ve selected a few multimatch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github micromatch / extglob / test / support / matcher.js View on Github external
// label for debugging
mm.multimatch = true;
mi.minimatch = true;
extglob.extglob = true;
bash.bash = true;

/**
 * Decorate methods onto multimatch for parity with nanomatch
 */

mm.isMatch = function(files, patterns, options) {
  return mm(utils.arrayify(files), patterns, options).length > 0;
};

mm.contains = function(files, patterns, options) {
  return mm.isMatch(files, patterns, options);
};

mm.match = function(files, patterns, options) {
  return mm(utils.arrayify(files), patterns, options);
};

mm.makeRe = function(pattern, options) {
  return mi.makeRe(pattern, options);
};

/**
 * Decorate methods onto minimatch for parity with nanomatch
 */

mi.isMatch = function(file, pattern, options) {

multimatch

Extends `minimatch.match()` with support for multiple patterns

MIT
Latest version published 1 year ago

Package Health Score

73 / 100
Full package analysis