MCPcopy Index your code
hub / github.com/cameri/nostream / resolveExportFormat

Function resolveExportFormat

src/scripts/export-events.ts:195–205  ·  view source on GitHub ↗
(format?: string)

Source from the content-addressed store, hash-verified

193}
194
195const resolveExportFormat = (format?: string): 'jsonl' | 'json' => {
196 if (!format) {
197 return 'jsonl'
198 }
199
200 if (format === 'jsonl' || format === 'json') {
201 return format
202 }
203
204 throw new Error(`Unsupported format: ${format}. Supported values: json, jsonl`)
205}
206
207const resolveOutputPath = (filename: string | undefined, format: 'jsonl' | 'json'): string => {
208 const fallback = format === 'json' ? 'events.json' : 'events.jsonl'

Callers 1

runExportEventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected