MCPcopy Create free account
hub / github.com/massCodeIO/massCode / getSnippetBody

Function getSnippetBody

src/main/import/snippets/vscode.ts:63–73  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

61}
62
63function getSnippetBody(value: unknown): string | null {
64 if (typeof value === 'string') {
65 return value
66 }
67
68 if (Array.isArray(value) && value.every(item => typeof item === 'string')) {
69 return value.join('\n')
70 }
71
72 return null
73}
74
75function inferLanguage(fileName: string, snippet: VSCodeSnippetValue): string {
76 if (typeof snippet.scope === 'string' && snippet.scope.trim()) {

Callers 1

parseVSCodeSnippetFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected