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

Function buildTagMap

src/main/import/snippets/snippetsLab.ts:97–110  ·  view source on GitHub ↗
(tags: SnippetsLabRecord[])

Source from the content-addressed store, hash-verified

95}
96
97function buildTagMap(tags: SnippetsLabRecord[]): Map<string, string> {
98 const map = new Map<string, string>()
99
100 tags.forEach((tag) => {
101 const uuid = readString(tag, 'uuid')
102 const title = normalizeImportTag(readString(tag, 'title'))
103
104 if (uuid && title) {
105 map.set(uuid, title)
106 }
107 })
108
109 return map
110}
111
112function getTags(record: SnippetsLabRecord, tagMap: Map<string, string>) {
113 const rawTags = record.tags

Callers 1

parseSnippetsLabFilesFunction · 0.85

Calls 3

normalizeImportTagFunction · 0.90
readStringFunction · 0.70
setMethod · 0.45

Tested by

no test coverage detected