@@ -47,7 +47,7 @@ hast into estree (JavaScript) as JSX, which has some similarities to XML.
4747## Install
4848
4949This package is [ ESM only] [ esm ] .
50- In Node.js (version 14.14+ and or 16.0 +), install with [ npm] [ ] :
50+ In Node.js (version 16 +), install with [ npm] [ ] :
5151
5252``` sh
5353npm install hast-util-to-xast
@@ -105,7 +105,7 @@ console.log(toXml(xast))
105105
106106## API
107107
108- This package exports the identifier [ ` toXast ` ] [ toxast ] .
108+ This package exports the identifier [ ` toXast ` ] [ api-to-xast ] .
109109There is no default export.
110110
111111### ` toXast(tree[, options]) `
@@ -116,7 +116,7 @@ Turn a [hast][] tree into a [xast][] tree.
116116
117117* ` tree ` ([ ` HastNode ` ] [ hast-node ] )
118118 — hast tree to transform
119- * ` options ` ([ ` Options ` ] [ options ] , optional)
119+ * ` options ` ([ ` Options ` ] [ api- options] , optional)
120120 — configuration
121121
122122###### Returns
@@ -131,7 +131,7 @@ Configuration (TypeScript type).
131131
132132###### ` space `
133133
134- Which space the document is in.
134+ Which space the document is in ( [ ` Space ` ] [ api-space ] , default: ` 'html' ` ) .
135135
136136When an ` <svg> ` element is found in the HTML space, this package already
137137automatically switches to and from the SVG space when entering and exiting it.
@@ -152,14 +152,18 @@ type Space = 'html' | 'svg'
152152## Types
153153
154154This package is fully typed with [TypeScript][].
155- It exports the additional types [ ` Options ` ][options] and [ ` Space ` ][space].
155+ It exports the additional types [ ` Options ` ][api-options] and
156+ [ ` Space ` ][api-space].
156157
157158## Compatibility
158159
159- Projects maintained by the unified collective are compatible with all maintained
160+ Projects maintained by the unified collective are compatible with maintained
160161versions 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.
162+
163+ When we cut a new major release, we drop support for unmaintained versions of
164+ Node.
165+ This means we try to keep the current release line, ` hast -util -to -xast @^2 ` ,
166+ compatible with Node.js 12.
163167
164168## Security
165169
@@ -204,9 +208,9 @@ abide by its terms.
204208
205209[downloads]: https://www.npmjs.com/package/hast-util-to-xast
206210
207- [size-badge]: https://img.shields.io/bundlephobia/minzip/ hast-util-to-xast.svg
211+ [size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= hast-util-to-xast
208212
209- [size]: https://bundlephobia .com/result?p =hast-util-to-xast
213+ [size]: https://bundlejs .com/?q =hast-util-to-xast
210214
211215[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
212216
@@ -250,8 +254,8 @@ abide by its terms.
250254
251255[xast-node]: https://github.com/syntax-tree/xast#nodes
252256
253- [toxast ]: #toxasttree-options
257+ [api-to-xast ]: #toxasttree-options
254258
255- [options]: #options
259+ [api- options]: #options
256260
257- [space]: #space-1
261+ [api- space]: #space-1
0 commit comments