web-csv-toolbox 0.0.2 → 0.1.0
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/README.md +4 -4
- package/lib/index.d.ts +1 -1
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A CSV Toolbox utilizing Web Standard APIs.
|
|
4
4
|
|
|
5
|
-
## Key
|
|
5
|
+
## Key Concepts
|
|
6
6
|
|
|
7
7
|
- Web Standards first.
|
|
8
8
|
- Using the [Web Streams API](https://streams.spec.whatwg.org/).
|
|
@@ -16,7 +16,7 @@ A CSV Toolbox utilizing Web Standard APIs.
|
|
|
16
16
|
- Works on browsers and Node.js, Deno
|
|
17
17
|
- Only web standard APIs are used, so it should work with these Runtimes.
|
|
18
18
|
|
|
19
|
-
## Key
|
|
19
|
+
## Key Features
|
|
20
20
|
|
|
21
21
|
- Parses CSV files using the [WHATWG Streams API](https://streams.spec.whatwg.org/).
|
|
22
22
|
- Supports parsing CSV files from strings, `ReadableStream`s, and `Response` objects.
|
|
@@ -51,7 +51,7 @@ for await (const record of parse(csv)) {
|
|
|
51
51
|
// { name: 'Bob', age: '69' }
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
### Parsing CSV files from `ReadableStream`s
|
|
55
55
|
|
|
56
56
|
```js
|
|
57
57
|
import { parse } from 'web-csv-toolbox';
|
|
@@ -123,7 +123,7 @@ for await (const record of parse(csv, { headers: ['name', 'age'] })) {
|
|
|
123
123
|
// { name: 'Bob', age: '69' }
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
##
|
|
126
|
+
## APIs
|
|
127
127
|
|
|
128
128
|
### High-level APIs
|
|
129
129
|
|
package/lib/index.d.ts
CHANGED
|
@@ -139,7 +139,7 @@ interface ParseBinaryOptions<Header extends ReadonlyArray<string>>
|
|
|
139
139
|
* CSV Record.
|
|
140
140
|
* @template Header Header of the CSV.
|
|
141
141
|
*
|
|
142
|
-
* @example Header is
|
|
142
|
+
* @example Header is ["foo", "bar"]
|
|
143
143
|
* ```ts
|
|
144
144
|
* const record: CSVRecord<["foo", "bar"]> = {
|
|
145
145
|
* foo: "1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-csv-toolbox",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "A CSV Toolbox utilizing Web Standard APIs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"README.md"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
+
"doc": "typedoc",
|
|
24
25
|
"test": "vitest",
|
|
25
26
|
"format": "biome format . --write",
|
|
26
27
|
"lint": "biome lint .",
|
|
@@ -47,8 +48,10 @@
|
|
|
47
48
|
"homepage": "https://github.com/kamiazya/web-csv-toolbox#readme",
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@biomejs/biome": "1.4.1",
|
|
51
|
+
"@changesets/changelog-github": "^0.5.0",
|
|
50
52
|
"@changesets/cli": "^2.27.1",
|
|
51
|
-
"@fast-check/vitest": "^0.0.
|
|
53
|
+
"@fast-check/vitest": "^0.0.9",
|
|
54
|
+
"changesets-github-release": "^0.1.0",
|
|
52
55
|
"husky": "^8.0.0",
|
|
53
56
|
"jsdom": "^23.0.1",
|
|
54
57
|
"lint-staged": "^15.2.0",
|
|
@@ -56,7 +59,8 @@
|
|
|
56
59
|
"rollup-plugin-delete": "^2.0.0",
|
|
57
60
|
"rollup-plugin-dts": "^6.1.0",
|
|
58
61
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
62
|
+
"typedoc": "^0.25.4",
|
|
59
63
|
"typescript": "^5.3.2",
|
|
60
|
-
"vitest": "^
|
|
64
|
+
"vitest": "^1.1.0"
|
|
61
65
|
}
|
|
62
|
-
}
|
|
66
|
+
}
|