@@ -39,7 +39,7 @@ You should try and keep your trees clean yourself.
39
39
## Install
40
40
41
41
This package is [ ESM only] [ esm ] .
42
- In Node.js (version 12.20+, 14.14+, or 16.0+), install with [ npm] [ ] :
42
+ In Node.js (version 14.14+ and 16.0+), install with [ npm] [ ] :
43
43
44
44
``` sh
45
45
npm install mdast-util-compact
@@ -83,14 +83,17 @@ Yields:
83
83
84
84
## API
85
85
86
- This package exports the identifier ` compact ` .
86
+ This package exports the identifier [ ` compact ` ] [ api-compact ] .
87
87
There is no default export.
88
88
89
89
### ` compact(tree) `
90
90
91
- Collapse nodes in ` tree ` ([ ` Node ` ] [ node ] ).
92
- Combines adjacent texts and collapses blockquotes.
93
- Handles [ positional information] [ position-information ] properly.
91
+ Make an mdast tree compact by merging adjacent text nodes and block quotes.
92
+
93
+ ###### Parameters
94
+
95
+ * ` tree ` ([ ` Node ` ] [ node ] )
96
+ — tree to change
94
97
95
98
###### Returns
96
99
@@ -99,13 +102,13 @@ The given `tree` ([`Node`][node]).
99
102
## Types
100
103
101
104
This package is fully typed with [ TypeScript] [ ] .
102
- There are no additional types exported .
105
+ It exports no additional types.
103
106
104
107
## Compatibility
105
108
106
109
Projects maintained by the unified collective are compatible with all maintained
107
110
versions of Node.js.
108
- As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
111
+ As of now, that is Node.js 14.14+ and 16.0+.
109
112
Our projects sometimes work with older versions, but this is not guaranteed.
110
113
111
114
## Security
@@ -182,10 +185,10 @@ abide by its terms.
182
185
183
186
[ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
184
187
185
- [ position-information ] : https://github.com/syntax-tree/unist#positional-information
186
-
187
188
[ mdast ] : https://github.com/syntax-tree/mdast
188
189
189
190
[ node ] : https://github.com/syntax-tree/mdast#node
190
191
191
192
[ hast ] : https://github.com/syntax-tree/hast
193
+
194
+ [ api-compact ] : #compacttree
0 commit comments