@@ -49,7 +49,7 @@ same at a higher-level (easier) abstraction.
49
49
## Install
50
50
51
51
This package is [ ESM only] [ esm ] .
52
- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
52
+ In Node.js (version 16 +), install with [ npm] [ ] :
53
53
54
54
``` sh
55
55
npm install mdast-util-to-nlcst
@@ -80,11 +80,11 @@ Some *foo*sball.
80
80
…and next to it a module ` example.js ` :
81
81
82
82
``` js
83
- import {read } from ' to-vfile'
84
- import {ParseEnglish } from ' parse-english'
85
- import {inspect } from ' unist-util-inspect'
86
83
import {fromMarkdown } from ' mdast-util-from-markdown'
87
84
import {toNlcst } from ' mdast-util-to-nlcst'
85
+ import {ParseEnglish } from ' parse-english'
86
+ import {read } from ' to-vfile'
87
+ import {inspect } from ' unist-util-inspect'
88
88
89
89
const file = await read (' example.md' )
90
90
const mdast = fromMarkdown (file)
@@ -110,7 +110,7 @@ RootNode[1] (1:1-1:17, 0-16)
110
110
111
111
## API
112
112
113
- This package exports the identifier [ ` toNlcst ` ] [ api-tonlcst ] .
113
+ This package exports the identifier [ ` toNlcst ` ] [ api-to-nlcst ] .
114
114
There is no default export.
115
115
116
116
### ` toNlcst(tree, file, Parser[, options]) `
@@ -126,8 +126,8 @@ Turn an mdast tree into an nlcst tree.
126
126
— mdast tree to transform
127
127
* ` file ` ([ ` VFile ` ] [ vfile ] )
128
128
— virtual file
129
- * ` Parser ` ([ ` ParserConstructor ` ] [ api-parserconstructor ] or
130
- [ ` ParserInstance ` ] [ api-parserinstance ] )
129
+ * ` Parser ` ([ ` ParserConstructor ` ] [ api-parser-constructor ] or
130
+ [ ` ParserInstance ` ] [ api-parser-instance ] )
131
131
— parser to use
132
132
* ` options ` ([ ` Options ` ] [ api-options ] , optional)
133
133
— configuration
@@ -245,15 +245,18 @@ type ParserInstance = {
245
245
246
246
This package is fully typed with [TypeScript][].
247
247
It exports the types [ ` Options ` ][api-options],
248
- [ ` ParserConstructor ` ][api-parserconstructor ], and
249
- [ ` ParserInstance ` ][api-parserinstance ].
248
+ [ ` ParserConstructor ` ][api-parser-constructor ], and
249
+ [ ` ParserInstance ` ][api-parser-instance ].
250
250
251
251
## Compatibility
252
252
253
- Projects maintained by the unified collective are compatible with all maintained
253
+ Projects maintained by the unified collective are compatible with maintained
254
254
versions of Node.js.
255
- As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
256
- Our projects sometimes work with older versions, but this is not guaranteed.
255
+
256
+ When we cut a new major release, we drop support for unmaintained versions of
257
+ Node.
258
+ This means we try to keep the current release line, ` mdast -util -to -nlcst @^6 ` ,
259
+ compatible with Node.js 12.
257
260
258
261
## Security
259
262
@@ -301,9 +304,9 @@ abide by its terms.
301
304
302
305
[downloads]: https://www.npmjs.com/package/mdast-util-to-nlcst
303
306
304
- [size-badge]: https://img.shields.io/bundlephobia/minzip/ mdast-util-to-nlcst.svg
307
+ [size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= mdast-util-to-nlcst
305
308
306
- [size]: https://bundlephobia .com/result?p =mdast-util-to-nlcst
309
+ [size]: https://bundlejs .com/?q =mdast-util-to-nlcst
307
310
308
311
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
309
312
@@ -359,10 +362,10 @@ abide by its terms.
359
362
360
363
[parse-dutch]: https://github.com/wooorm/parse-dutch
361
364
362
- [api-tonlcst ]: #tonlcsttree-file-parser-options
365
+ [api-to-nlcst ]: #tonlcsttree-file-parser-options
363
366
364
367
[api-options]: #options
365
368
366
- [api-parserconstructor ]: #parserconstructor
369
+ [api-parser-constructor ]: #parserconstructor
367
370
368
- [api-parserinstance ]: #parserinstance
371
+ [api-parser-instance ]: #parserinstance
0 commit comments