Fix for some keys and added some kwargs

This commit is contained in:
2023-11-03 17:09:53 +02:00
parent a09e3a76be
commit f39625a985
2 changed files with 62 additions and 23 deletions

View File

@ -7,6 +7,7 @@
*
*/
export function objectWithArraysToArrayOfObjects(input: Record<string, any>, ignoredKeys: string[]): Record<string, any>[] {
ignoredKeys = ignoredKeys.map((k) => Array.isArray(input[k]) ? undefined : k).filter((k) => k !== undefined) as string[];
const keys = Object.keys(input).filter((k) => !ignoredKeys.includes(k));
const maxLength = Math.max(
...keys.map((k) =>