MCPcopy
hub / github.com/microsoft/vscode-js-debug / autoAttachSmartPatternMatches

Function autoAttachSmartPatternMatches

src/targets/node/bootloader.ts:235–247  ·  view source on GitHub ↗
(script: string, env: IBootloaderInfo)

Source from the content-addressed store, hash-verified

233}
234
235function autoAttachSmartPatternMatches(script: string, env: IBootloaderInfo) {
236 if (!env.aaPatterns) {
237 return false;
238 }
239
240 const r = match(
241 [script.replace(/\\/g, '/')],
242 [...env.aaPatterns.map(p => p.replace(knownToolToken, knownToolGlob))],
243 { dot: true, nocase: true },
244 );
245
246 return r.length > 0;
247}
248
249function isPipeAvailable(pipe?: string): pipe is string {
250 if (!pipe) {

Callers 1

shouldSmartAttachFunction · 0.85

Calls 2

mapMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected