refactoring

This commit is contained in:
frankknoll
2023-10-15 10:35:32 +02:00
parent 5cc2b0c99f
commit b6c5a92b55
9 changed files with 23 additions and 12 deletions

View File

@@ -26,15 +26,6 @@ class Utils {
}
static convertDict2CSV(dict) {
const {'keys': columns, 'values': firstRow} = Utils.getKeysAlignedWithValues(dict);
return `${Utils.#quoteValues(columns)}\n${firstRow}`;
}
static #quoteValues(values) {
return values.map(Utils.#quoteValue);
}
static #quoteValue(value) {
return '"' + value + '"';
return Dict2CsvConverter.convertDict2CSV(dict);
}
}