MCPcopy Index your code
hub / github.com/awesome-opencode/awesome-opencode / mapEntry

Function mapEntry

scripts/export-json.js:42–63  ·  view source on GitHub ↗
(entry, category)

Source from the content-addressed store, hash-verified

40}
41
42function mapEntry(entry, category) {
43 const productId = buildProductId(entry);
44 if (!productId) {
45 return null;
46 }
47
48 const output = {
49 productId,
50 type: category,
51 displayName: entry.name,
52 repoUrl: entry.repo,
53 tagline: entry.tagline,
54 description: entry.description,
55 scope: sanitizeArray(entry.scope, ['global']),
56 tags: sanitizeArray(entry.tags, []),
57 homepageUrl: entry.homepage,
58 installation: entry.installation,
59 minVersion: entry.min_version
60 };
61
62 return output;
63}
64
65function stripUndefined(data) {
66 const cleaned = {};

Callers 1

loadEntriesFunction · 0.85

Calls 2

buildProductIdFunction · 0.85
sanitizeArrayFunction · 0.85

Tested by

no test coverage detected