lib/pre-proc.js
function isTargetPath(srcPath, pathTest) {
  return !srcPath ||
    (Array.isArray(pathTest) ? pathTest : [pathTest]).some(function(test) {
      return test && (test instanceof RegExp ? test.test(srcPath) : srcPath.indexOf(test) === 0);
    });
}
function isTargetPath(srcPath, pathTest) {
  return !srcPath ||
    (Array.isArray(pathTest) ? pathTest : [pathTest]).some(function(test) {
      return test && (test instanceof RegExp ? test.test(srcPath) : srcPath.indexOf(test) === 0);
    });
}
function isTargetPath ( srcPath , pathTest ) { return ! srcPath || ( Array . isArray ( pathTest ) ? pathTest : [ pathTest ] ) . some ( function ( test ) { return test && ( test instanceof RegExp ? test . test ( srcPath ) : srcPath . indexOf ( test ) === 0 ) ; } ) ; }
Test whether a path is target.
@param {string} [srcPath] - A full path.
@param {(string|RegExp|Array)} [pathTest] - A string which must be at the start, a RegExp which tests or an array.
@returns {boolean} `true` if the `srcPath` is target, or `srcPath` is omitted.
Test whether a path is target .