Format all files

This commit is contained in:
Owen
2025-12-09 10:56:14 -05:00
parent fa839a811f
commit f9b03943c3
535 changed files with 7670 additions and 5626 deletions

View File

@@ -2,15 +2,17 @@ export function generateCSV(data: any[]): string {
if (data.length === 0) {
return "orgId,action,actorType,timestamp,actor\n";
}
const headers = Object.keys(data[0]).join(",");
const rows = data.map(row =>
Object.values(row).map(value =>
typeof value === 'string' && value.includes(',')
? `"${value.replace(/"/g, '""')}"`
: value
).join(",")
const rows = data.map((row) =>
Object.values(row)
.map((value) =>
typeof value === "string" && value.includes(",")
? `"${value.replace(/"/g, '""')}"`
: value
)
.join(",")
);
return [headers, ...rows].join("\n");
}
}

View File

@@ -90,4 +90,4 @@ export type QueryAccessAuditLogResponse = {
}[];
locations: string[];
};
};
};