MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / insertWorkspaceName

Function insertWorkspaceName

src/extension/utils.ts:48–53  ·  view source on GitHub ↗
(p: T)

Source from the content-addressed store, hash-verified

46}
47
48export function insertWorkspaceName<T extends string | undefined>(p: T): string | (undefined extends T ? undefined : never) {
49 if (typeof p !== "string")
50 return undefined as (undefined extends T ? undefined : never);
51
52 return p.replace(/\${workspaceName}/ig, filenameSafe(workspace.name ?? "unnamed-workspace"));
53}
54
55export function isAnalyzable(file: { uri: Uri, isUntitled?: boolean, languageId?: string }): boolean {
56 if (file.isUntitled || !fsPath(file.uri) || file.uri.scheme !== "file")

Callers 15

analyzerLogFileMethod · 0.90
dapLogFileMethod · 0.90
devToolsLogFileMethod · 0.90
mcpServerLogFileMethod · 0.90
extensionLogFileMethod · 0.90
flutterDaemonLogFileMethod · 0.90
toolingDaemonLogFileMethod · 0.90
webDaemonLogFileMethod · 0.90
analyzerLogFileMethod · 0.90

Calls 1

filenameSafeFunction · 0.90

Tested by

no test coverage detected