@@ -52,7 +52,7 @@ parse HTML with DOM APIs.
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 hast-util-from-dom
@@ -101,7 +101,7 @@ Now running `open example.html` prints the following to the console:
101
101
102
102
## API
103
103
104
- This package exports the identifier [ ` fromDom ` ] [ fromdom ] .
104
+ This package exports the identifier [ ` fromDom ` ] [ api-from-dom ] .
105
105
There is no default export.
106
106
107
107
### ` fromDom(tree, options?) `
@@ -112,7 +112,7 @@ Transform a DOM tree to a hast tree.
112
112
113
113
* ` tree ` ([ ` DomNode ` ] [ dom-node ] )
114
114
— DOM tree to transform
115
- * ` options ` ([ ` Options ` ] [ options ] , optional)
115
+ * ` options ` ([ ` Options ` ] [ api- options] , optional)
116
116
— configuration
117
117
118
118
###### Returns
@@ -140,7 +140,7 @@ Configuration (TypeScript type).
140
140
141
141
##### Fields
142
142
143
- * ` afterTransform ` ([ ` AfterTransform ` ] [ aftertransform ] , optional)
143
+ * ` afterTransform ` ([ ` AfterTransform ` ] [ api-after-transform ] , optional)
144
144
— callback called when each node is transformed
145
145
146
146
##### Returns
@@ -150,14 +150,18 @@ Configuration (TypeScript type).
150
150
## Types
151
151
152
152
This package is fully typed with [ TypeScript] [ ] .
153
- It exports the additional type ` Options ` .
153
+ It exports the additional types [ ` AfterTransform ` ] [ api-after-transform ] and
154
+ [ ` Options ` ] [ api-options ] .
154
155
155
156
## Compatibility
156
157
157
- Projects maintained by the unified collective are compatible with all maintained
158
+ Projects maintained by the unified collective are compatible with maintained
158
159
versions of Node.js.
159
- As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
160
- Our projects sometimes work with older versions, but this is not guaranteed.
160
+
161
+ When we cut a new major release, we drop support for unmaintained versions of
162
+ Node.
163
+ This means we try to keep the current release line, ` hast-util-from-dom@^4 ` ,
164
+ compatible with Node.js 12.
161
165
162
166
## Security
163
167
@@ -203,9 +207,9 @@ abide by its terms.
203
207
204
208
[ downloads ] : https://www.npmjs.com/package/hast-util-from-dom
205
209
206
- [ size-badge ] : https://img.shields.io/bundlephobia/minzip/ hast-util-from-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-from-dom
207
211
208
- [ size ] : https://bundlephobia .com/result?p =hast-util-from-dom
212
+ [ size ] : https://bundlejs .com/?q =hast-util-from-dom
209
213
210
214
[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
211
215
@@ -253,8 +257,8 @@ abide by its terms.
253
257
254
258
[ jsdom ] : https://github.com/jsdom/jsdom
255
259
256
- [ fromdom ] : #fromdomtree-options
260
+ [ api-from-dom ] : #fromdomtree-options
257
261
258
- [ options ] : #options
262
+ [ api- options] : #options
259
263
260
- [ aftertransform ] : #aftertransform
264
+ [ api-after-transform ] : #aftertransform
0 commit comments