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

Function buildProductId

scripts/export-json.js:25–33  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

23}
24
25function buildProductId(entry) {
26 if (entry._fileName) {
27 return entry._fileName;
28 }
29 if (entry.name) {
30 return slugify(entry.name);
31 }
32 return '';
33}
34
35function sanitizeArray(value, fallback) {
36 if (Array.isArray(value) && value.length > 0) {

Callers 1

mapEntryFunction · 0.85

Calls 1

slugifyFunction · 0.85

Tested by

no test coverage detected