How to use multimatch - 10 common examples

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 / micromatch / test / support / matcher.js View on Github external
var utils = require('../../lib/utils');
var argv = require('minimist')(process.argv.slice(2));
var bash = require('bash-match');
var minimatch = require('minimatch');
var mu = require('multimatch');
var mi = require('../..');

// use multimatch for the array/array scenario
function mm() {
  return mu.apply(null, arguments);
}

// label for debugging
mi.micromatch = true;
mu.multimatch = true;
mm.minimatch = true;
bash.bash = true;

/**
 * Decorate methods onto bash for parity with micromatch
 */

bash.makeRe = function() {};

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

mu.isMatch = function(files, patterns, options) {
  return mu(utils.arrayify(files), patterns, options).length > 0;
};
github micromatch / extglob / test / support / matcher.js View on Github external
'use strict';

var argv = require('minimist')(process.argv.slice(2));
var mm = require('multimatch');
var minimatch = require('minimatch');
var bash = require('./try-bash');
var utils = require('./utils');
var extglob = require('../..');

// use multimatch for the array/array scenario
function mi() {
  return mm.apply(null, arguments);
}

// 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);
};
github micromatch / nanomatch / test / support / matcher.js View on Github external
var utils = require('../../lib/utils');
var argv = require('minimist')(process.argv.slice(2));
var bash = require('bash-match');
var minimatch = require('minimatch');
var mu = require('multimatch');
var mi = require('../..');

// use multimatch for the array/array scenario
function mm() {
  return mu.apply(null, arguments);
}

// label for debugging
mi.nanomatch = true;
mu.multimatch = true;
mm.minimatch = true;
bash.bash = true;

/**
 * Decorate methods onto bash for parity with micromatch
 */

bash.makeRe = function() {};

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

mu.isMatch = function(files, patterns, options) {
  return mu(utils.arrayify(files), patterns, options).length > 0;
};
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) {
github micromatch / nanomatch / test / support / matcher.js View on Github external
function mm() {
  return mu.apply(null, arguments);
}
github micromatch / extglob / test / support / matcher.js View on Github external
function mi() {
  return mm.apply(null, arguments);
}
github micromatch / micromatch / test / support / matcher.js View on Github external
function mm() {
  return mu.apply(null, arguments);
}
github micromatch / nanomatch / test / support / matcher.js View on Github external
bash.makeRe = function() {};

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

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

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

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

mu.braces = function(pattern, options) {
  return mm.braceExpand(pattern, options);
};

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

mm.isMatch = function(file, pattern, options) {
  return minimatch(file, pattern, options);
};

mm.match = function(files, pattern, options) {
github micromatch / micromatch / test / support / matcher.js View on Github external
bash.makeRe = function() {};

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

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

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

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

mu.braces = function(pattern, options) {
  return mm.braceExpand(pattern, options);
};

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

mm.isMatch = function(file, pattern, options) {
  return minimatch(file, pattern, options);
};

mm.match = function(files, pattern, options) {
github micromatch / extglob / test / support / matcher.js View on Github external
* 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) {
  return minimatch(file, pattern, options);
};

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

mi.match = function(files, 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