MCPcopy Create free account
hub / github.com/Xyntopia/taskyon / splitCSVIntoLines

Function splitCSVIntoLines

src/modules/localVectorStore.ts:177–187  ·  view source on GitHub ↗
(csvData: string)

Source from the content-addressed store, hash-verified

175}*/
176
177function splitCSVIntoLines(csvData: string): string[] {
178 // Regular expression to match CSV lines, ignoring newline characters inside quotes
179 const lines = csvData.match(/(?:[^"\n\r]+|"[^"]*")+?(?=\r?\n|$)/g);
180
181 if (lines) {
182 const csvlines = lines.map((line) => line.trim());
183 return csvlines;
184 } else {
185 return [];
186 }
187}
188
189function loadCollection(collectionName: string) {
190 void loadDocumentStore(collectionName).then((docstore) => {

Callers 1

uploadToIndexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected