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

Function sanitizeArray

scripts/export-json.js:35–40  ·  view source on GitHub ↗
(value, fallback)

Source from the content-addressed store, hash-verified

33}
34
35function sanitizeArray(value, fallback) {
36 if (Array.isArray(value) && value.length > 0) {
37 return value;
38 }
39 return fallback;
40}
41
42function mapEntry(entry, category) {
43 const productId = buildProductId(entry);

Callers 1

mapEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected