Skip to content

Commit 7aa2162

Browse files
committed
Refactor docs
1 parent bc3ccfc commit 7aa2162

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

readme.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ to mark the start and end of sections.
5050
## Install
5151

5252
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][]:
5454

5555
```sh
5656
npm install mdast-util-heading-range
@@ -121,7 +121,7 @@ Qux.
121121

122122
## API
123123

124-
This package exports the identifier [`headingRange`][api-headingrange].
124+
This package exports the identifier [`headingRange`][api-heading-range].
125125
There is no default export.
126126

127127
### `headingRange(tree, test|options, handler)`
@@ -207,7 +207,7 @@ when `RegExp`, wrapped in `(value) => expression.test(value)`
207207
###### Type
208208

209209
```ts
210-
export type Test = string | RegExp | TestFunction
210+
export type Test = RegExp | TestFunction | string
211211
```
212212
213213
### `TestFunction`
@@ -230,14 +230,17 @@ Whether this is the heading that is searched for (`boolean`, optional).
230230
This package is fully typed with [TypeScript][].
231231
This package exports the types [`Handler`][api-handler],
232232
[`Info`][api-info], [`Options`][api-options], [`Test`][api-test],
233-
and [`TestFunction`][api-testfunction].
233+
and [`TestFunction`][api-test-function].
234234
235235
## Compatibility
236236
237-
Projects maintained by the unified collective are compatible with all maintained
237+
Projects maintained by the unified collective are compatible with maintained
238238
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.
241244
242245
## Security
243246
@@ -300,9 +303,9 @@ abide by its terms.
300303

301304
[downloads]: https://www.npmjs.com/package/mdast-util-heading-range
302305

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
304307

305-
[size]: https://bundlephobia.com/result?p=mdast-util-heading-range
308+
[size]: https://bundlejs.com/?q=mdast-util-heading-range
306309

307310
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
308311

@@ -350,14 +353,14 @@ abide by its terms.
350353

351354
[remark-toc]: https://github.com/remarkjs/remark-toc
352355

353-
[api-headingrange]: #headingrangetree-testoptions-handler
356+
[api-heading-range]: #headingrangetree-testoptions-handler
354357

355358
[api-handler]: #handler
356359

357360
[api-options]: #options
358361

359362
[api-test]: #test
360363

361-
[api-testfunction]: #testfunction
364+
[api-test-function]: #testfunction
362365

363366
[api-info]: #info

0 commit comments

Comments
 (0)