@thi.ng/csv 2.3.66 → 2.3.68
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/CHANGELOG.md +1 -1
- package/format.js +1 -1
- package/package.json +5 -5
- package/parse.d.ts +2 -0
package/CHANGELOG.md
CHANGED
package/format.js
CHANGED
|
@@ -8,7 +8,7 @@ import { str } from "@thi.ng/transducers/str";
|
|
|
8
8
|
import { transduce } from "@thi.ng/transducers/transduce";
|
|
9
9
|
function formatCSV(opts = {}, src) {
|
|
10
10
|
return isIterable(src) ? iterator(formatCSV(opts), src) : (rfn) => {
|
|
11
|
-
let { cols = [], delim = ",", quote =
|
|
11
|
+
let { cols = [], delim = ",", quote = '"', header } = opts;
|
|
12
12
|
let colTx;
|
|
13
13
|
const reQuote = new RegExp(quote, "g");
|
|
14
14
|
const reduce = rfn[2];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/csv",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.68",
|
|
4
4
|
"description": "Customizable, transducer-based CSV parser/object mapper and transformer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
38
|
+
"@thi.ng/api": "^8.9.26",
|
|
39
39
|
"@thi.ng/checks": "^3.5.0",
|
|
40
|
-
"@thi.ng/strings": "^3.7.
|
|
41
|
-
"@thi.ng/transducers": "^8.9.
|
|
40
|
+
"@thi.ng/strings": "^3.7.18",
|
|
41
|
+
"@thi.ng/transducers": "^8.9.7"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@microsoft/api-extractor": "^7.40.1",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"thi.ng": {
|
|
86
86
|
"year": 2014
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "190d68e7f7524631b333cfdbf32c6a23be27c166\n"
|
|
89
89
|
}
|
package/parse.d.ts
CHANGED
|
@@ -67,6 +67,8 @@ export declare function parseCSV(opts: Partial<CSVOpts>, src: Iterable<string>):
|
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
69
|
* ```ts
|
|
70
|
+
* import { parseCSVSimple, float } from "@thi.ng/csv";
|
|
71
|
+
*
|
|
70
72
|
* [...parseCSVSimple({ cols: [float(), ,float()]}, ["a,b,c","1,2,3","4,5,6"])]
|
|
71
73
|
* // [ [ 1, 3 ], [ 4, 6 ] ]
|
|
72
74
|
* ```
|