MCPcopy
hub / github.com/C4illin/ConvertX / convert

Function convert

src/converters/vcf.ts:57–69  ·  view source on GitHub ↗
(
  filePath: string,
  fileType: string,
  convertTo: string,
  targetPath: string,
  options?: unknown, // eslint-disable-line @typescript-eslint/no-unused-vars
)

Source from the content-addressed store, hash-verified

55}
56
57export async function convert(
58 filePath: string,
59 fileType: string,
60 convertTo: string,
61 targetPath: string,
62 options?: unknown, // eslint-disable-line @typescript-eslint/no-unused-vars
63): Promise<string> {
64 const vcfData = await readFile(filePath, "utf-8");
65 const contacts = parseVCF(vcfData);
66 const csvData = toCSV(contacts);
67 await writeFile(targetPath, csvData, "utf-8");
68 return "Done";
69}

Callers

nothing calls this directly

Calls 2

parseVCFFunction · 0.85
toCSVFunction · 0.85

Tested by

no test coverage detected