MCPcopy Create free account
hub / github.com/HelloCSV/HelloCSV / applyTransformations

Function applyTransformations

src/transformers/index.ts:49–68  ·  view source on GitHub ↗
(
  sheetDefinitions: SheetDefinition[],
  sheetStates: SheetState[]
)

Source from the content-addressed store, hash-verified

47}
48
49export function applyTransformations(
50 sheetDefinitions: SheetDefinition[],
51 sheetStates: SheetState[]
52) {
53 const newSheetStates: SheetState[] = [];
54
55 sheetDefinitions.forEach((sheetDefinition) => {
56 const sheetData = sheetStates.find(
57 (state) => state.sheetId === sheetDefinition.id
58 );
59
60 if (sheetData) {
61 const newRows = transformSheet(sheetDefinition, sheetData);
62
63 newSheetStates.push({ sheetId: sheetDefinition.id, rows: newRows });
64 }
65 });
66
67 return newSheetStates;
68}
69
70export class Pipeline {
71 steps: Transformer[];

Callers 3

getSubmittedSheetDataFunction · 0.90
reducerFunction · 0.90
index.test.jsFile · 0.85

Calls 2

transformSheetFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected