@@ -50,7 +50,7 @@ to mark the start and end of sections.
50
50
## Install
51
51
52
52
This package is [ ESM only] [ esm ] .
53
- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
53
+ In Node.js (version 16 +), install with [ npm] [ ] :
54
54
55
55
``` sh
56
56
npm install mdast-util-heading-range
121
121
122
122
## API
123
123
124
- This package exports the identifier [ ` headingRange ` ] [ api-headingrange ] .
124
+ This package exports the identifier [ ` headingRange ` ] [ api-heading-range ] .
125
125
There is no default export.
126
126
127
127
### ` headingRange(tree, test|options, handler) `
@@ -207,7 +207,7 @@ when `RegExp`, wrapped in `(value) => expression.test(value)`
207
207
###### Type
208
208
209
209
``` ts
210
- export type Test = string | RegExp | TestFunction
210
+ export type Test = RegExp | TestFunction | string
211
211
` ` `
212
212
213
213
### ` TestFunction `
@@ -230,14 +230,17 @@ Whether this is the heading that is searched for (`boolean`, optional).
230
230
This package is fully typed with [TypeScript][].
231
231
This package exports the types [ ` Handler ` ][api-handler],
232
232
[ ` Info ` ][api-info], [ ` Options ` ][api-options], [ ` Test ` ][api-test],
233
- and [ ` TestFunction ` ][api-testfunction ].
233
+ and [ ` TestFunction ` ][api-test-function ].
234
234
235
235
## Compatibility
236
236
237
- Projects maintained by the unified collective are compatible with all maintained
237
+ Projects maintained by the unified collective are compatible with maintained
238
238
versions of Node.js.
239
- As of now, that is Node.js 14.14+ and 16.0+.
240
- Our projects sometimes work with older versions, but this is not guaranteed.
239
+
240
+ When we cut a new major release, we drop support for unmaintained versions of
241
+ Node.
242
+ This means we try to keep the current release line,
243
+ ` mdast -util -heading -range @^3 ` , compatible with Node.js 12.
241
244
242
245
## Security
243
246
@@ -300,9 +303,9 @@ abide by its terms.
300
303
301
304
[ downloads ] : https://www.npmjs.com/package/mdast-util-heading-range
302
305
303
- [ size-badge ] : https://img.shields.io/bundlephobia/minzip/ mdast-util-heading-range.svg
306
+ [ size-badge ] : https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= mdast-util-heading-range
304
307
305
- [ size ] : https://bundlephobia .com/result?p =mdast-util-heading-range
308
+ [ size ] : https://bundlejs .com/?q =mdast-util-heading-range
306
309
307
310
[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
308
311
@@ -350,14 +353,14 @@ abide by its terms.
350
353
351
354
[ remark-toc ] : https://github.com/remarkjs/remark-toc
352
355
353
- [ api-headingrange ] : #headingrangetree-testoptions-handler
356
+ [ api-heading-range ] : #headingrangetree-testoptions-handler
354
357
355
358
[ api-handler ] : #handler
356
359
357
360
[ api-options ] : #options
358
361
359
362
[ api-test ] : #test
360
363
361
- [ api-testfunction ] : #testfunction
364
+ [ api-test-function ] : #testfunction
362
365
363
366
[ api-info ] : #info
0 commit comments