@@ -52,7 +52,7 @@ utility but for HTML: it turns [hast][] into HTML.
52
52
## Install
53
53
54
54
This package is [ ESM only] [ esm ] .
55
- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
55
+ In Node.js (version 16 +), install with [ npm] [ ] :
56
56
57
57
``` sh
58
58
npm install xast-util-to-xml
@@ -115,7 +115,7 @@ Yields:
115
115
116
116
## API
117
117
118
- This package exports the identifier [ ` toXml ` ] [ toxml ] .
118
+ This package exports the identifier [ ` toXml ` ] [ api-to-xml ] .
119
119
There is no default export.
120
120
121
121
### ` toXml(tree[, options]) `
@@ -124,9 +124,9 @@ Serialize a xast tree to XML.
124
124
125
125
###### Parameters
126
126
127
- * ` tree ` ([ ` Node ` ] [ node ] or ` Array< Node> ` )
127
+ * ` tree ` ([ ` Array< Node> ` ] [ node ] or ` Node ` )
128
128
— xast node(s) to serialize
129
- * ` options ` ([ ` Options ` ] [ options ] , optional)
129
+ * ` options ` ([ ` Options ` ] [ api- options] , optional)
130
130
— configuration
131
131
132
132
###### Returns
@@ -157,7 +157,7 @@ See `tightClose` to control whether a space is used before the slash.
157
157
158
158
###### ` quote `
159
159
160
- Preferred quote to use ([ ` Quote ` ] [ quote ] , default: ` '"' ` ).
160
+ Preferred quote to use ([ ` Quote ` ] [ api- quote] , default: ` '"' ` ).
161
161
162
162
###### ` quoteSmart `
163
163
@@ -184,14 +184,18 @@ type Quote = '"' | "'"
184
184
## Types
185
185
186
186
This package is fully typed with [TypeScript][].
187
- It exports the additional types [ ` Options ` ][options] and [ ` Quote ` ][quote].
187
+ It exports the additional types [ ` Options ` ][api-options] and
188
+ [ ` Quote ` ][api-quote].
188
189
189
190
## Compatibility
190
191
191
- Projects maintained by the unified collective are compatible with all maintained
192
+ Projects maintained by the unified collective are compatible with maintained
192
193
versions of Node.js.
193
- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18.0+.
194
- Our projects sometimes work with older versions, but this is not guaranteed.
194
+
195
+ When we cut a new major release, we drop support for unmaintained versions of
196
+ Node.
197
+ This means we try to keep the current release line, ` xast -util -to -xml @^3 ` ,
198
+ compatible with Node.js 12.
195
199
196
200
## Security
197
201
@@ -234,9 +238,9 @@ abide by its terms.
234
238
235
239
[downloads]: https://www.npmjs.com/package/xast-util-to-xml
236
240
237
- [size-badge]: https://img.shields.io/bundlephobia/minzip/ xast-util-to-xml.svg
241
+ [size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= xast-util-to-xml
238
242
239
- [size]: https://bundlephobia .com/result?p =xast-util-to-xml
243
+ [size]: https://bundlejs .com/?q =xast-util-to-xml
240
244
241
245
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
242
246
@@ -278,8 +282,8 @@ abide by its terms.
278
282
279
283
[hast-util-to-html]: https://github.com/syntax-tree/hast-util-to-html
280
284
281
- [toxml ]: #toxmltree-options
285
+ [api-to-xml ]: #toxmltree-options
282
286
283
- [options]: #options
287
+ [api- options]: #options
284
288
285
- [quote]: #quote-1
289
+ [api- quote]: #quote-1
0 commit comments