Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function fromFluxLegacy(csv: string): FromFluxResult {
const parsedFlux = fromFlux(csv)
return {
table: Object.entries(parsedFlux.table.columns).reduce(
(table, [key, column]) => {
return table.addColumn(
key,
column.type,
column.data as string[],
column.name
)
},
newTable(parsedFlux.table.length)
),
fluxGroupKeyUnion: parsedFlux.fluxGroupKeyUnion,
schema: {},
}
}