resolver/resolve-fix.js
function match(list, patterns, options) {
		list = list || [];
		patterns = patterns || [];
		if(_.isString(patterns)) {
			patterns = [patterns];
		}

		if(list.length === 0 || patterns.length === 0) {
			return [];
		}

		options = options || {};
		return patterns.reduce(function(ret, pattern) {
			var process = _.union
			if(pattern[0] === '!') {
				pattern = pattern.slice(1);
				process = _.difference;
			}
			return process(ret, minimatch.match(list, pattern, options));
		}, []);
	}
function match(list, patterns, options) {
		list = list || [];
		patterns = patterns || [];
		if(_.isString(patterns)) {
			patterns = [patterns];
		}

		if(list.length === 0 || patterns.length === 0) {
			return [];
		}

		options = options || {};
		return patterns.reduce(function(ret, pattern) {
			var process = _.union
			if(pattern[0] === '!') {
				pattern = pattern.slice(1);
				process = _.difference;
			}
			return process(ret, minimatch.match(list, pattern, options));
		}, []);
	}
Find items in array that match a set of patterns
Adapted from https://github.com/sindresorhus/multimatch

@param {string[]} list
@param {string[]|string} patterns
@param {Object} options
@returns {string[]}