How to use the multimatch.multimatch 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 / 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;
};

multimatch

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

MIT
Latest version published 1 year ago

Package Health Score

73 / 100
Full package analysis