Skip to content

Commit 5e8a3a0

Browse files
committed
Refactor docs
1 parent 66d8da6 commit 5e8a3a0

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

readme.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ To change heading ranks, use
4141
## Install
4242

4343
This package is [ESM only][esm].
44-
In Node.js (version 14.14+ and 16.0+), install with [npm][]:
44+
In Node.js (version 16+), install with [npm][]:
4545

4646
```sh
4747
npm install hast-util-heading-rank
@@ -73,7 +73,7 @@ headingRank(h('h5', 'Alpha')) //=> 5
7373

7474
## API
7575

76-
This package exports the identifier [`headingRank`][headingrank].
76+
This package exports the identifier [`headingRank`][api-heading-rank].
7777
There is no default export.
7878

7979
### `headingRank(node)`
@@ -87,7 +87,7 @@ Get the rank (`1` to `6`) of headings (`h1` to `h6`).
8787

8888
###### Returns
8989

90-
Rank of the heading or `undefined` if not a heading (`number | undefined`).
90+
Rank of the heading (`number`) or `undefined` if not a heading.
9191

9292
## Types
9393

@@ -96,10 +96,13 @@ It exports no additional types.
9696

9797
## Compatibility
9898

99-
Projects maintained by the unified collective are compatible with all maintained
99+
Projects maintained by the unified collective are compatible with maintained
100100
versions of Node.js.
101-
As of now, that is Node.js 14.14+ and 16.0+.
102-
Our projects sometimes work with older versions, but this is not guaranteed.
101+
102+
When we cut a new major release, we drop support for unmaintained versions of
103+
Node.
104+
This means we try to keep the current release line,
105+
`hast-util-heading-rank@^2`, compatible with Node.js 12.
103106

104107
## Security
105108

@@ -141,9 +144,9 @@ abide by its terms.
141144

142145
[downloads]: https://www.npmjs.com/package/hast-util-heading-rank
143146

144-
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-heading-rank.svg
147+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-heading-rank
145148

146-
[size]: https://bundlephobia.com/result?p=hast-util-heading-rank
149+
[size]: https://bundlejs.com/?q=hast-util-heading-rank
147150

148151
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
149152

@@ -183,4 +186,4 @@ abide by its terms.
183186

184187
[hast-util-shift-heading]: https://github.com/syntax-tree/hast-util-shift-heading
185188

186-
[headingrank]: #headingranknode
189+
[api-heading-rank]: #headingranknode

0 commit comments

Comments
 (0)