@@ -48,7 +48,7 @@ same at a higher-level (easier) abstraction.
48
48
## Install
49
49
50
50
This package is [ ESM only] [ esm ] .
51
- In Node.js (version 14.14+ and or 16.0 +), install with [ npm] [ ] :
51
+ In Node.js (version 16 +), install with [ npm] [ ] :
52
52
53
53
``` sh
54
54
npm install hast-util-to-nlcst
@@ -57,14 +57,14 @@ npm install hast-util-to-nlcst
57
57
In Deno with [ ` esm.sh ` ] [ esmsh ] :
58
58
59
59
``` js
60
- import {toNlcst } from " https://esm.sh/hast-util-to-nlcst@3"
60
+ import {toNlcst } from ' https://esm.sh/hast-util-to-nlcst@3'
61
61
```
62
62
63
63
In browsers with [ ` esm.sh ` ] [ esmsh ] :
64
64
65
65
``` html
66
66
<script type =" module" >
67
- import {toNlcst } from " https://esm.sh/hast-util-to-nlcst@3?bundle"
67
+ import {toNlcst } from ' https://esm.sh/hast-util-to-nlcst@3?bundle'
68
68
</script >
69
69
```
70
70
@@ -83,11 +83,11 @@ Say our document `example.html` contains:
83
83
…and our module ` example.js ` looks as follows:
84
84
85
85
``` js
86
- import {read } from ' to-vfile'
87
- import {inspect } from ' unist-util-inspect'
88
- import {toNlcst } from ' hast-util-to-nlcst'
89
86
import {fromHtml } from ' hast-util-from-html'
87
+ import {toNlcst } from ' hast-util-to-nlcst'
90
88
import {ParseEnglish } from ' parse-english'
89
+ import {read } from ' to-vfile'
90
+ import {inspect } from ' unist-util-inspect'
91
91
92
92
const file = await read (' example.html' )
93
93
const tree = fromHtml (file)
@@ -121,7 +121,7 @@ RootNode[2] (1:1-6:1, 0-134)
121
121
122
122
## API
123
123
124
- This package exports the identifier [ ` toNlcst ` ] [ tonlcst ] .
124
+ This package exports the identifier [ ` toNlcst ` ] [ api-to-nlcst ] .
125
125
There is no default export.
126
126
127
127
### ` toNlcst(tree, file, Parser) `
@@ -137,8 +137,8 @@ Turn a hast tree into an nlcst tree.
137
137
— hast tree to transform
138
138
* ` file ` ([ ` VFile ` ] [ vfile ] )
139
139
— virtual file
140
- * ` Parser ` ([ ` ParserConstructor ` ] [ parserconstructor ] or
141
- [ ` ParserInstance ` ] [ parserinstance ] )
140
+ * ` Parser ` ([ ` ParserConstructor ` ] [ api-parser-constructor ] or
141
+ [ ` ParserInstance ` ] [ api-parser-instance ] )
142
142
— parser to use.
143
143
144
144
##### Returns
@@ -218,15 +218,18 @@ type ParserInstance = {
218
218
## Types
219
219
220
220
This package is fully typed with [TypeScript][].
221
- It exports the additional types [ ` ParserConstructor ` ][parserconstructor] and
222
- [ ` ParserInstance ` ][parserinstance ].
221
+ It exports the additional types [ ` ParserConstructor ` ][api-parser-constructor]
222
+ and [` ParserInstance ` ][api-parser-instance ].
223
223
224
224
## Compatibility
225
225
226
- Projects maintained by the unified collective are compatible with all maintained
226
+ Projects maintained by the unified collective are compatible with maintained
227
227
versions of Node.js.
228
- As of now, that is Node.js 14.14+ and 16.0+.
229
- Our projects sometimes work with older versions, but this is not guaranteed.
228
+
229
+ When we cut a new major release, we drop support for unmaintained versions of
230
+ Node.
231
+ This means we try to keep the current release line, ` hast -util -to -nlcst @^3 ` ,
232
+ compatible with Node.js 12.
230
233
231
234
## Security
232
235
@@ -270,9 +273,9 @@ abide by its terms.
270
273
271
274
[downloads]: https://www.npmjs.com/package/hast-util-to-nlcst
272
275
273
- [size-badge]: https://img.shields.io/bundlephobia/minzip/ hast-util-to-nlcst.svg
276
+ [size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= hast-util-to-nlcst
274
277
275
- [size]: https://bundlephobia .com/result?p =hast-util-to-nlcst
278
+ [size]: https://bundlejs .com/?q =hast-util-to-nlcst
276
279
277
280
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
278
281
@@ -328,8 +331,8 @@ abide by its terms.
328
331
329
332
[parse-dutch]: https://github.com/wooorm/parse-dutch
330
333
331
- [tonlcst ]: #tonlcsttree-file-parser
334
+ [api-to-nlcst ]: #tonlcsttree-file-parser
332
335
333
- [parserconstructor ]: #parserconstructor
336
+ [api-parser-constructor ]: #parserconstructor
334
337
335
- [parserinstance ]: #parserinstance
338
+ [api-parser-instance ]: #parserinstance
0 commit comments