88[ ![ Backers] [ backers-badge ]] [ collective ]
99[ ![ Chat] [ chat-badge ]] [ chat ]
1010
11- [ hast] [ ] utility to generate [ ` parse5 ` ] [ parse5 ] s [ AST] [ parse5-node ] .
11+ [ hast] [ ] utility to transform to a [ ` parse5 ` ] [ parse5 ] [ AST] [ parse5-node ] .
1212
1313## Contents
1414
2929
3030## What is this?
3131
32- This package is a utility that can turn a hast syntax tree into ` parse5 ` s AST.
32+ This package is a utility that can turn a hast syntax tree into a ` parse5 ` AST.
3333Why not use a Parse5 adapter, you might ask?
3434Well, because it’s more code weight to use adapters, and more fragile.
3535
@@ -43,7 +43,7 @@ likely what you want.
4343## Install
4444
4545This package is [ ESM only] [ esm ] .
46- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
46+ In Node.js (version 16 +), install with [ npm] [ ] :
4747
4848``` sh
4949npm install hast-util-to-parse5
@@ -90,18 +90,18 @@ Yields:
9090
9191## API
9292
93- This package exports the identifier [ ` toParse5 ` ] [ toparse5 ] .
93+ This package exports the identifier [ ` toParse5 ` ] [ api-to-parse5 ] .
9494There is no default export.
9595
9696### ` toParse5(tree[, options]) `
9797
98- Transform a hast tree to Parse5’s AST.
98+ Transform a hast tree to a ` parse5 ` AST.
9999
100100###### Parameters
101101
102102* ` tree ` ([ ` HastNode ` ] [ hast-node ] )
103103 — tree to transform
104- * ` options ` ([ ` Options ` ] [ options ] , optional)
104+ * ` options ` ([ ` Options ` ] [ api- options] , optional)
105105 — configuration
106106
107107###### Returns
@@ -114,7 +114,7 @@ Configuration (TypeScript type).
114114
115115###### Fields
116116
117- * ` space ` ([ ` Space ` ] [ space ] , optional)
117+ * ` space ` ([ ` Space ` ] [ api- space] , optional)
118118 — which space the document is in
119119
120120### ` Space `
@@ -130,14 +130,18 @@ type Space = 'html' | 'svg'
130130## Types
131131
132132This package is fully typed with [TypeScript][].
133- It exports the additional types [ ` Options ` ][options] and [ ` Space ` ][space].
133+ It exports the additional types [ ` Options ` ][api-options] and
134+ [ ` Space ` ][api-space].
134135
135136## Compatibility
136137
137- Projects maintained by the unified collective are compatible with all maintained
138+ Projects maintained by the unified collective are compatible with maintained
138139versions of Node.js.
139- As of now, that is Node.js 14.14+ and 16.0+.
140- Our projects sometimes work with older versions, but this is not guaranteed.
140+
141+ When we cut a new major release, we drop support for unmaintained versions of
142+ Node.
143+ This means we try to keep the current release line, ` hast -util -to -parse5 @^7 ` ,
144+ compatible with Node.js 12.
141145
142146## Security
143147
@@ -187,9 +191,9 @@ abide by its terms.
187191
188192[downloads]: https://www.npmjs.com/package/hast-util-to-parse5
189193
190- [size-badge]: https://img.shields.io/bundlephobia/minzip/ hast-util-to-parse5.svg
194+ [size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= hast-util-to-parse5
191195
192- [size]: https://bundlephobia .com/result?p =hast-util-to-parse5
196+ [size]: https://bundlejs .com/?q =hast-util-to-parse5
193197
194198[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
195199
@@ -233,8 +237,8 @@ abide by its terms.
233237
234238[hast-util-from-parse5]: https://github.com/syntax-tree/hast-util-from-parse5
235239
236- [toparse5 ]: #toparse5tree-options
240+ [api-to-parse5 ]: #toparse5tree-options
237241
238- [options]: #options
242+ [api- options]: #options
239243
240- [space]: #space
244+ [api- space]: #space
0 commit comments