MCPcopy Index your code
hub / github.com/massCodeIO/massCode / getContents

Function getContents

src/main/import/snippets/snippetsLab.ts:54–68  ·  view source on GitHub ↗
(parsed: unknown)

Source from the content-addressed store, hash-verified

52}
53
54function getContents(parsed: unknown): SnippetsLabRecord | null {
55 if (!isRecord(parsed) || !isRecord(parsed.contents)) {
56 return null
57 }
58
59 const snippets = getRecordArray(parsed.contents, 'snippets')
60 const schema = readString(parsed, 'schema')
61 const app = readString(parsed, 'app')
62
63 if (!snippets.length || (!schema && !app)) {
64 return null
65 }
66
67 return parsed.contents
68}
69
70function buildFolderPathMap(
71 folders: SnippetsLabRecord[],

Callers 1

parseSnippetsLabFilesFunction · 0.85

Calls 3

getRecordArrayFunction · 0.85
isRecordFunction · 0.70
readStringFunction · 0.70

Tested by

no test coverage detected