t-comm
Version:
专业、稳定、纯粹的工具库
20 lines (16 loc) • 583 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
function checkFileBaseMinimatch(_a) {
var file = _a.file,
include = _a.include,
exclude = _a.exclude,
minimatch = _a.minimatch;
var curInclude = Array.isArray(include) ? include : [include];
var curExclude = Array.isArray(exclude) ? exclude : [exclude];
return curInclude.some(function (pattern) {
return minimatch(file, pattern);
}) && !curExclude.some(function (pattern) {
return minimatch(file, pattern);
});
}
exports.checkFileBaseMinimatch = checkFileBaseMinimatch;