@thi.ng/csv 2.2.28 → 2.2.30

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-11-30T22:27:37Z
3
+ - **Last updated**: 2022-12-20T16:33:11Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![csv](https://media.thi.ng/umbrella/banners-20220914/thing-csv.svg?4f8977d0)
3
+ # ![@thi.ng/csv](https://media.thi.ng/umbrella/banners-20220914/thing-csv.svg?4f8977d0)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/csv.svg)](https://www.npmjs.com/package/@thi.ng/csv)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/csv.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -21,7 +21,7 @@ This project is part of the
21
21
 
22
22
  ## About
23
23
 
24
- Customizable, transducer-based CSV parser/object mapper and transformer.
24
+ Customizable, transducer-based CSV parser/object mapper and transformer
25
25
 
26
26
  Partially ported and extended from the Clojure versions of the
27
27
  [ws-ldn-1](https://github.com/thi-ng/ws-ldn-1/blob/master/src/ws_ldn_1/day1/csv.clj)
@@ -71,11 +71,8 @@ ES module import:
71
71
 
72
72
  For Node.js REPL:
73
73
 
74
- ```text
75
- # with flag only for < v16
76
- node --experimental-repl-await
77
-
78
- > const csv = await import("@thi.ng/csv");
74
+ ```js
75
+ const csv = await import("@thi.ng/csv");
79
76
  ```
80
77
 
81
78
  Package sizes (brotli'd, pre-treeshake): ESM: 1.52 KB
@@ -124,7 +121,7 @@ import { parseCSV, upper, float } from "@thi.ng/csv";
124
121
 
125
122
  ## Authors
126
123
 
127
- Karsten Schmidt
124
+ - [Karsten Schmidt](https://thi.ng)
128
125
 
129
126
  If this project contributes to an academic publication, please cite it as:
130
127
 
@@ -139,4 +136,4 @@ If this project contributes to an academic publication, please cite it as:
139
136
 
140
137
  ## License
141
138
 
142
- &copy; 2014 - 2022 Karsten Schmidt // Apache Software License 2.0
139
+ &copy; 2014 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -3,17 +3,17 @@ import type { Stringer } from "@thi.ng/strings";
3
3
  /**
4
4
  * Tuple representing a single CSV row/record.
5
5
  */
6
- export declare type CSVRow = any[];
6
+ export type CSVRow = any[];
7
7
  /**
8
8
  * Tuple object representing a single CSV row/record
9
9
  */
10
- export declare type CSVRecord = Record<string, any>;
10
+ export type CSVRecord = Record<string, any>;
11
11
  /**
12
12
  * Cell value transformer used to coerce cell values. The 2nd arg provided is
13
13
  * the (incomplete) result array/object of the current row, useful for creating
14
14
  * derived values, taking other columns into account.
15
15
  */
16
- export declare type CellTransform = Fn2<string, any, any>;
16
+ export type CellTransform = Fn2<string, any, any>;
17
17
  export interface ColumnSpec {
18
18
  /**
19
19
  * Rename column to given name in result objects.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/csv",
3
- "version": "2.2.28",
3
+ "version": "2.2.30",
4
4
  "description": "Customizable, transducer-based CSV parser/object mapper and transformer",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
12
12
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/csv#readme",
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/csv#readme",
14
14
  "funding": [
15
15
  {
16
16
  "type": "github",
@@ -21,7 +21,7 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
27
  "build": "yarn clean && tsc --declaration",
@@ -34,18 +34,18 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.5.1",
38
- "@thi.ng/checks": "^3.3.4",
39
- "@thi.ng/strings": "^3.3.19",
40
- "@thi.ng/transducers": "^8.3.25"
37
+ "@thi.ng/api": "^8.6.1",
38
+ "@thi.ng/checks": "^3.3.5",
39
+ "@thi.ng/strings": "^3.3.21",
40
+ "@thi.ng/transducers": "^8.3.27"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.33.5",
44
- "@thi.ng/testament": "^0.3.6",
43
+ "@microsoft/api-extractor": "^7.33.7",
44
+ "@thi.ng/testament": "^0.3.7",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
- "typedoc": "^0.23.20",
48
- "typescript": "^4.8.4"
47
+ "typedoc": "^0.23.22",
48
+ "typescript": "^4.9.4"
49
49
  },
50
50
  "keywords": [
51
51
  "csv",
@@ -85,5 +85,5 @@
85
85
  "thi.ng": {
86
86
  "year": 2014
87
87
  },
88
- "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
88
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
89
89
  }
package/parse.d.ts CHANGED
@@ -78,7 +78,7 @@ export declare function parseCSVSimple(opts: Partial<SimpleCSVOpts>, src: Iterab
78
78
  /**
79
79
  * Syntax sugar for iterator version of {@link parseCSV}, efficiently splitting
80
80
  * given source string into a line based input using
81
- * {@link @thi.ng/strings#split}.
81
+ * [`split()`](https://docs.thi.ng/umbrella/strings/functions/split.html).
82
82
  *
83
83
  * @param opts -
84
84
  * @param src -
@@ -87,7 +87,7 @@ export declare const parseCSVFromString: (opts: Partial<CSVOpts>, src: string) =
87
87
  /**
88
88
  * Syntax sugar for iterator version of {@link parseCSVSimple}, efficiently
89
89
  * splitting given source string into a line based input using
90
- * {@link @thi.ng/strings#split}.
90
+ * [`split()`](https://docs.thi.ng/umbrella/strings/functions/split.html).
91
91
  *
92
92
  * @param opts -
93
93
  * @param src -
package/parse.js CHANGED
@@ -121,7 +121,7 @@ export function parseCSVSimple(opts, src) {
121
121
  /**
122
122
  * Syntax sugar for iterator version of {@link parseCSV}, efficiently splitting
123
123
  * given source string into a line based input using
124
- * {@link @thi.ng/strings#split}.
124
+ * [`split()`](https://docs.thi.ng/umbrella/strings/functions/split.html).
125
125
  *
126
126
  * @param opts -
127
127
  * @param src -
@@ -130,7 +130,7 @@ export const parseCSVFromString = (opts, src) => parseCSV(opts, split(src));
130
130
  /**
131
131
  * Syntax sugar for iterator version of {@link parseCSVSimple}, efficiently
132
132
  * splitting given source string into a line based input using
133
- * {@link @thi.ng/strings#split}.
133
+ * [`split()`](https://docs.thi.ng/umbrella/strings/functions/split.html).
134
134
  *
135
135
  * @param opts -
136
136
  * @param src -