MCPcopy Create free account
hub / github.com/DFin/palaeograph / complete

Function complete

src/csvLoader.js:55–72  ·  view source on GitHub ↗
(results)

Source from the content-addressed store, hash-verified

53 skipEmptyLines: true,
54 dynamicTyping: false,
55 complete(results) {
56 const headers = (results.meta.fields || []).map(sanitizeHeader).filter(Boolean);
57 const rows = results.data
58 .map((entry) => {
59 const row = {};
60 headers.forEach((header) => {
61 row[header] = entry[header];
62 });
63 return row;
64 })
65 .filter((row) => Object.values(row).some((value) => value !== null && value !== ""));
66
67 resolve({
68 headers,
69 rows,
70 columnStats: analyzeColumns(rows, headers)
71 });
72 },
73 error(error) {
74 reject(error);
75 }

Callers

nothing calls this directly

Calls 1

analyzeColumnsFunction · 0.85

Tested by

no test coverage detected