'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

function checkFileBaseMinimatch(_ref) {
  var file = _ref.file,
    include = _ref.include,
    exclude = _ref.exclude,
    minimatch = _ref.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;
