MCPcopy Create free account
hub / github.com/experdot/pointer / convert

Function convert

src/renderer/src/features/export/plugins/formats/csvFormat.ts:16–30  ·  view source on GitHub ↗
(content: ExtractedContent, _: ExportOptions)

Source from the content-addressed store, hash-verified

14
15 // eslint-disable-next-line @typescript-eslint/no-unused-vars
16 async convert(content: ExtractedContent, _: ExportOptions): Promise<ConvertResult> {
17 if (content.contentType !== 'table') {
18 throw new Error('CSV format only supports table content')
19 }
20
21 const csv = markdownTableToCsv(content.rawContent)
22
23 return {
24 content: csv,
25 preview: csv,
26 isBinary: false,
27 extension: 'csv',
28 mimeType: 'text/csv'
29 }
30 }
31}
32
33/**

Callers

nothing calls this directly

Calls 1

markdownTableToCsvFunction · 0.85

Tested by

no test coverage detected