MCPcopy Index your code
hub / github.com/nodejs/node / getFileMatcherPatterns

Function getFileMatcherPatterns

test/fixtures/snapshot/typescript.js:20630–20641  ·  view source on GitHub ↗

@param path directory of the tsconfig.json

(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory)

Source from the content-addressed store, hash-verified

20628 }
20629 /** @param path directory of the tsconfig.json */
20630 function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames, currentDirectory) {
20631 path = ts.normalizePath(path);
20632 currentDirectory = ts.normalizePath(currentDirectory);
20633 var absolutePath = ts.combinePaths(currentDirectory, path);
20634 return {
20635 includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
20636 includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
20637 includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
20638 excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
20639 basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames)
20640 };
20641 }
20642 ts.getFileMatcherPatterns = getFileMatcherPatterns;
20643 function getRegexFromPattern(pattern, useCaseSensitiveFileNames) {
20644 return new RegExp(pattern, useCaseSensitiveFileNames ? "" : "i");

Callers 1

matchFilesFunction · 0.85

Calls 5

getBasePathsFunction · 0.85
concatMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected