MCPcopy Index your code
hub / github.com/anomalyco/opencode / exportValue

Function exportValue

packages/opencode/src/plugin/install.ts:105–119  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

103}
104
105function exportValue(value: unknown): string | undefined {
106 if (typeof value === "string") {
107 const next = value.trim()
108 if (next) return next
109 return
110 }
111 if (!isRecord(value)) return
112 for (const key of ["import", "default"]) {
113 const next = value[key]
114 if (typeof next !== "string") continue
115 const hit = next.trim()
116 if (!hit) continue
117 return hit
118 }
119}
120
121function exportOptions(value: unknown): Record<string, unknown> | undefined {
122 if (!isRecord(value)) return

Callers 1

exportTargetFunction · 0.85

Calls 1

isRecordFunction · 0.90

Tested by

no test coverage detected