@thi.ng/markdown-table 0.3.5 → 0.3.8
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/README.md +2 -2
- package/package.json +15 -15
- package/table.d.ts +7 -7
- package/table.js +7 -7
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ node --experimental-repl-await
|
|
|
58
58
|
> const markdownTable = await import("@thi.ng/markdown-table");
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Package sizes (gzipped, pre-treeshake): ESM:
|
|
61
|
+
Package sizes (gzipped, pre-treeshake): ESM: 645 bytes
|
|
62
62
|
|
|
63
63
|
## Dependencies
|
|
64
64
|
|
|
@@ -139,4 +139,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
139
139
|
|
|
140
140
|
## License
|
|
141
141
|
|
|
142
|
-
© 2021 Karsten Schmidt // Apache Software License 2.0
|
|
142
|
+
© 2021 - 2022 Karsten Schmidt // Apache Software License 2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/markdown-table",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Markdown table formatter/generator with support for column alignments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.3.
|
|
38
|
-
"@thi.ng/checks": "^3.1.
|
|
39
|
-
"@thi.ng/compose": "^2.1.
|
|
40
|
-
"@thi.ng/errors": "^2.1.
|
|
41
|
-
"@thi.ng/strings": "^3.3.
|
|
42
|
-
"@thi.ng/transducers": "^8.2
|
|
37
|
+
"@thi.ng/api": "^8.3.6",
|
|
38
|
+
"@thi.ng/checks": "^3.1.6",
|
|
39
|
+
"@thi.ng/compose": "^2.1.6",
|
|
40
|
+
"@thi.ng/errors": "^2.1.6",
|
|
41
|
+
"@thi.ng/strings": "^3.3.4",
|
|
42
|
+
"@thi.ng/transducers": "^8.3.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "^7.
|
|
46
|
-
"@thi.ng/testament": "^0.2.
|
|
45
|
+
"@microsoft/api-extractor": "^7.23.1",
|
|
46
|
+
"@thi.ng/testament": "^0.2.6",
|
|
47
47
|
"rimraf": "^3.0.2",
|
|
48
48
|
"tools": "^0.0.1",
|
|
49
|
-
"typedoc": "^0.22.
|
|
50
|
-
"typescript": "^4.
|
|
49
|
+
"typedoc": "^0.22.15",
|
|
50
|
+
"typescript": "^4.6.4"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"align",
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
],
|
|
72
72
|
"exports": {
|
|
73
73
|
".": {
|
|
74
|
-
"
|
|
74
|
+
"default": "./index.js"
|
|
75
75
|
},
|
|
76
76
|
"./api": {
|
|
77
|
-
"
|
|
77
|
+
"default": "./api.js"
|
|
78
78
|
},
|
|
79
79
|
"./table": {
|
|
80
|
-
"
|
|
80
|
+
"default": "./table.js"
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"thi.ng": {
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
],
|
|
88
88
|
"year": 2021
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "cf084be5fd5932226054d2dd32bad35481379f5d\n"
|
|
91
91
|
}
|
package/table.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ import type { Column, Row, TableOpts } from "./api.js";
|
|
|
29
29
|
* // | 44 | Dora | (recipient) |
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
|
-
* @param header
|
|
33
|
-
* @param rows
|
|
34
|
-
* @param opts
|
|
32
|
+
* @param header -
|
|
33
|
+
* @param rows -
|
|
34
|
+
* @param opts -
|
|
35
35
|
*/
|
|
36
36
|
export declare const table: (header: string[], rows: Iterable<Row>, opts?: Partial<TableOpts>) => string;
|
|
37
37
|
/**
|
|
@@ -60,10 +60,10 @@ export declare const table: (header: string[], rows: Iterable<Row>, opts?: Parti
|
|
|
60
60
|
* // | 44 | Dora | (recipient) |
|
|
61
61
|
* ```
|
|
62
62
|
*
|
|
63
|
-
* @param headers
|
|
64
|
-
* @param keys
|
|
65
|
-
* @param items
|
|
66
|
-
* @param opts
|
|
63
|
+
* @param headers -
|
|
64
|
+
* @param keys -
|
|
65
|
+
* @param items -
|
|
66
|
+
* @param opts -
|
|
67
67
|
*/
|
|
68
68
|
export declare const tableKeys: <T>(headers: string[], keys: (keyof T | Fn<T, Column>)[], items: Iterable<T>, opts?: Partial<TableOpts> | undefined) => string;
|
|
69
69
|
//# sourceMappingURL=table.d.ts.map
|
package/table.js
CHANGED
|
@@ -54,9 +54,9 @@ const SEPS = {
|
|
|
54
54
|
* // | 44 | Dora | (recipient) |
|
|
55
55
|
* ```
|
|
56
56
|
*
|
|
57
|
-
* @param header
|
|
58
|
-
* @param rows
|
|
59
|
-
* @param opts
|
|
57
|
+
* @param header -
|
|
58
|
+
* @param rows -
|
|
59
|
+
* @param opts -
|
|
60
60
|
*/
|
|
61
61
|
export const table = (header, rows, opts = {}) => {
|
|
62
62
|
const numColumns = header.length;
|
|
@@ -99,10 +99,10 @@ export const table = (header, rows, opts = {}) => {
|
|
|
99
99
|
* // | 44 | Dora | (recipient) |
|
|
100
100
|
* ```
|
|
101
101
|
*
|
|
102
|
-
* @param headers
|
|
103
|
-
* @param keys
|
|
104
|
-
* @param items
|
|
105
|
-
* @param opts
|
|
102
|
+
* @param headers -
|
|
103
|
+
* @param keys -
|
|
104
|
+
* @param items -
|
|
105
|
+
* @param opts -
|
|
106
106
|
*/
|
|
107
107
|
export const tableKeys = (headers, keys, items, opts) => table(headers, map(juxt(
|
|
108
108
|
// @ts-ignore
|