@d-mok/quasar-app-extension-quasar-axe 2.0.23 → 2.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import Papa from 'papaparse'
|
|
2
2
|
|
|
3
|
-
export function unparseCSV(
|
|
3
|
+
export function unparseCSV(
|
|
4
|
+
arr: Record<string, any>[],
|
|
5
|
+
delimiter: string
|
|
6
|
+
): string {
|
|
4
7
|
return Papa.unparse(arr, {
|
|
5
8
|
quotes: false, //or array of booleans
|
|
6
9
|
quoteChar: '"',
|
|
7
10
|
escapeChar: '"',
|
|
8
|
-
delimiter
|
|
11
|
+
delimiter,
|
|
9
12
|
header: true,
|
|
10
13
|
newline: '\r\n',
|
|
11
14
|
skipEmptyLines: false, //other option is 'greedy', meaning skip delimiters, quotes, and whitespace.
|
|
12
15
|
})
|
|
13
|
-
|
|
14
|
-
// let fields = Object.keys(arr[0])
|
|
15
|
-
// let csv = fields.join(delimiter) + '\n'
|
|
16
|
-
// for (let obj of arr) {
|
|
17
|
-
// let line = fields.map(f => String(obj[f])).join(delimiter)
|
|
18
|
-
// csv += line + '\n'
|
|
19
|
-
// }
|
|
20
|
-
// return csv
|
|
21
16
|
}
|