Skip to content

Commit a1dd758

Browse files
committed
Refactor docs
1 parent db654bd commit a1dd758

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

readme.md

+18-14
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ utility but for HTML: it turns [hast][] into HTML.
5252
## Install
5353

5454
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][]:
5656

5757
```sh
5858
npm install xast-util-to-xml
@@ -115,7 +115,7 @@ Yields:
115115

116116
## API
117117

118-
This package exports the identifier [`toXml`][toxml].
118+
This package exports the identifier [`toXml`][api-to-xml].
119119
There is no default export.
120120

121121
### `toXml(tree[, options])`
@@ -124,9 +124,9 @@ Serialize a xast tree to XML.
124124

125125
###### Parameters
126126

127-
* `tree` ([`Node`][node] or `Array<Node>`)
127+
* `tree` ([`Array<Node>`][node] or `Node`)
128128
— xast node(s) to serialize
129-
* `options` ([`Options`][options], optional)
129+
* `options` ([`Options`][api-options], optional)
130130
— configuration
131131

132132
###### Returns
@@ -157,7 +157,7 @@ See `tightClose` to control whether a space is used before the slash.
157157

158158
###### `quote`
159159

160-
Preferred quote to use ([`Quote`][quote], default: `'"'`).
160+
Preferred quote to use ([`Quote`][api-quote], default: `'"'`).
161161

162162
###### `quoteSmart`
163163

@@ -184,14 +184,18 @@ type Quote = '"' | "'"
184184
## Types
185185
186186
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].
188189
189190
## Compatibility
190191
191-
Projects maintained by the unified collective are compatible with all maintained
192+
Projects maintained by the unified collective are compatible with maintained
192193
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.
195199
196200
## Security
197201
@@ -234,9 +238,9 @@ abide by its terms.
234238
235239
[downloads]: https://www.npmjs.com/package/xast-util-to-xml
236240
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
238242
239-
[size]: https://bundlephobia.com/result?p=xast-util-to-xml
243+
[size]: https://bundlejs.com/?q=xast-util-to-xml
240244
241245
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
242246
@@ -278,8 +282,8 @@ abide by its terms.
278282
279283
[hast-util-to-html]: https://github.com/syntax-tree/hast-util-to-html
280284
281-
[toxml]: #toxmltree-options
285+
[api-to-xml]: #toxmltree-options
282286
283-
[options]: #options
287+
[api-options]: #options
284288
285-
[quote]: #quote-1
289+
[api-quote]: #quote-1

0 commit comments

Comments
 (0)