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

Function isExcludedFile

test/fixtures/snapshot/typescript.js:42069–42083  ·  view source on GitHub ↗
(pathToCheck, spec, basePath, useCaseSensitiveFileNames, currentDirectory)

Source from the content-addressed store, hash-verified

42067 ts.getFileNamesFromConfigSpecs = getFileNamesFromConfigSpecs;
42068 /* @internal */
42069 function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames, currentDirectory) {
42070 var validatedFilesSpec = spec.validatedFilesSpec, validatedIncludeSpecs = spec.validatedIncludeSpecs, validatedExcludeSpecs = spec.validatedExcludeSpecs;
42071 if (!ts.length(validatedIncludeSpecs) || !ts.length(validatedExcludeSpecs))
42072 return false;
42073 basePath = ts.normalizePath(basePath);
42074 var keyMapper = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
42075 if (validatedFilesSpec) {
42076 for (var _i = 0, validatedFilesSpec_2 = validatedFilesSpec; _i < validatedFilesSpec_2.length; _i++) {
42077 var fileName = validatedFilesSpec_2[_i];
42078 if (keyMapper(ts.getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck)
42079 return false;
42080 }
42081 }
42082 return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath);
42083 }
42084 ts.isExcludedFile = isExcludedFile;
42085 function invalidDotDotAfterRecursiveWildcard(s) {
42086 // We used to use the regex /(^|\/)\*\*\/(.*\/)?\.\.($|\/)/ to check for this case, but

Callers

nothing calls this directly

Calls 2

matchesExcludeWorkerFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…