@@ -50,7 +50,7 @@ utility to serialize as HTML with DOM APIs.
50
50
## Install
51
51
52
52
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] [ ] :
54
54
55
55
``` sh
56
56
npm install hast-util-to-dom
96
96
97
97
## API
98
98
99
- This package exports the identifier [ ` toDom ` ] [ to-dom ] .
99
+ This package exports the identifier [ ` toDom ` ] [ api- to-dom] .
100
100
There is no default export.
101
101
102
102
### ` toDom(tree[, options]) `
@@ -107,7 +107,7 @@ Turn a hast tree into a DOM tree.
107
107
108
108
* ` tree ` ([ ` HastNode ` ] [ hast-node ] )
109
109
— tree to transform
110
- * ` options ` ([ ` Options ` ] [ options ] , optional)
110
+ * ` options ` ([ ` Options ` ] [ api- options] , optional)
111
111
— configuration
112
112
113
113
###### Returns
@@ -135,7 +135,7 @@ Configuration (TypeScript type).
135
135
136
136
###### Fields
137
137
138
- * ` afterTransform ` ([ ` AfterTransform ` ] [ aftertransform ] , optional)
138
+ * ` afterTransform ` ([ ` AfterTransform ` ] [ api-after-transform ] , optional)
139
139
— callback called when each node is transformed
140
140
* ` document ` (` Document ` , default: ` globalThis.document ` )
141
141
— document interface to use.
@@ -151,15 +151,18 @@ The syntax tree is [hast][].
151
151
## Types
152
152
153
153
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] .
156
156
157
157
## Compatibility
158
158
159
- Projects maintained by the unified collective are compatible with all maintained
159
+ Projects maintained by the unified collective are compatible with maintained
160
160
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.
163
166
164
167
## Security
165
168
@@ -204,9 +207,9 @@ abide by its terms.
204
207
205
208
[ downloads ] : https://www.npmjs.com/package/hast-util-to-dom
206
209
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
208
211
209
- [ size ] : https://bundlephobia .com/result?p =hast-util-to-dom
212
+ [ size ] : https://bundlejs .com/?q =hast-util-to-dom
210
213
211
214
[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
212
215
@@ -256,8 +259,8 @@ abide by its terms.
256
259
257
260
[ dom-node ] : https://developer.mozilla.org/docs/Web/API/Node
258
261
259
- [ to-dom ] : #todomtree-options
262
+ [ api- to-dom] : #todomtree-options
260
263
261
- [ aftertransform ] : #aftertransform
264
+ [ api-after-transform ] : #aftertransform
262
265
263
- [ options ] : #options
266
+ [ api- options] : #options
0 commit comments