Skip to content

Commit 04e67ed

Browse files
committed
Refactor docs
1 parent 42c958c commit 04e67ed

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

readme.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ utility to serialize as HTML with DOM APIs.
5050
## Install
5151

5252
This package is [ESM only][esm].
53-
In Node.js (version 14.14+ and 16.0+), install with [npm][]:
53+
In Node.js (version 16+), install with [npm][]:
5454

5555
```sh
5656
npm install hast-util-to-dom
@@ -96,7 +96,7 @@ page.
9696

9797
## API
9898

99-
This package exports the identifier [`toDom`][to-dom].
99+
This package exports the identifier [`toDom`][api-to-dom].
100100
There is no default export.
101101

102102
### `toDom(tree[, options])`
@@ -107,7 +107,7 @@ Turn a hast tree into a DOM tree.
107107

108108
* `tree` ([`HastNode`][hast-node])
109109
— tree to transform
110-
* `options` ([`Options`][options], optional)
110+
* `options` ([`Options`][api-options], optional)
111111
— configuration
112112

113113
###### Returns
@@ -135,7 +135,7 @@ Configuration (TypeScript type).
135135

136136
###### Fields
137137

138-
* `afterTransform` ([`AfterTransform`][aftertransform], optional)
138+
* `afterTransform` ([`AfterTransform`][api-after-transform], optional)
139139
— callback called when each node is transformed
140140
* `document` (`Document`, default: `globalThis.document`)
141141
— document interface to use.
@@ -151,15 +151,18 @@ The syntax tree is [hast][].
151151
## Types
152152

153153
This package is fully typed with [TypeScript][].
154-
It exports the additional types [`AfterTransform`][aftertransform] and
155-
[`Options`][options].
154+
It exports the additional types [`AfterTransform`][api-after-transform] and
155+
[`Options`][api-options].
156156

157157
## Compatibility
158158

159-
Projects maintained by the unified collective are compatible with all maintained
159+
Projects maintained by the unified collective are compatible with maintained
160160
versions of Node.js.
161-
As of now, that is Node.js 14.14+ and 16.0+.
162-
Our projects sometimes work with older versions, but this is not guaranteed.
161+
162+
When we cut a new major release, we drop support for unmaintained versions of
163+
Node.
164+
This means we try to keep the current release line, `hast-util-to-dom@^3`,
165+
compatible with Node.js 12.
163166

164167
## Security
165168

@@ -204,9 +207,9 @@ abide by its terms.
204207

205208
[downloads]: https://www.npmjs.com/package/hast-util-to-dom
206209

207-
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-to-dom.svg
210+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-to-dom
208211

209-
[size]: https://bundlephobia.com/result?p=hast-util-to-dom
212+
[size]: https://bundlejs.com/?q=hast-util-to-dom
210213

211214
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
212215

@@ -256,8 +259,8 @@ abide by its terms.
256259

257260
[dom-node]: https://developer.mozilla.org/docs/Web/API/Node
258261

259-
[to-dom]: #todomtree-options
262+
[api-to-dom]: #todomtree-options
260263

261-
[aftertransform]: #aftertransform
264+
[api-after-transform]: #aftertransform
262265

263-
[options]: #options
266+
[api-options]: #options

0 commit comments

Comments
 (0)