Skip to content

Commit d33a55e

Browse files
committed
Refactor docs
1 parent 71d653d commit d33a55e

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

readme.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ a document, for use with [`rehype-meta`][rehype-meta].
4949
## Install
5050

5151
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][]:
5353

5454
```sh
5555
npm install hast-util-excerpt
@@ -115,7 +115,7 @@ console.log(excerpt(tree));
115115

116116
## API
117117

118-
This package exports the identifier [`excerpt`][excerpt].
118+
This package exports the identifier [`excerpt`][api-excerpt].
119119
There is no default export.
120120

121121
### `excerpt(tree[, options])`
@@ -126,12 +126,12 @@ Truncate `tree` to a certain comment.
126126

127127
* `tree` ([`Node`][node])
128128
— tree to truncate
129-
* `options` ([`Options`][options])
129+
* `options` ([`Options`][api-options])
130130
— configuration (optional)
131131

132132
###### Returns
133133

134-
Truncated copy of `tree` ([`Node`][node]) when a comment is found, `undefined`
134+
Truncated clone of `tree` ([`Node`][node]) when a comment is found, `undefined`
135135
otherwise.
136136

137137
### `Options`
@@ -164,14 +164,17 @@ The syntax tree is [hast][].
164164
## Types
165165

166166
This package is fully typed with [TypeScript][].
167-
It exports the additional type [`Options`][options].
167+
It exports the additional type [`Options`][api-options].
168168

169169
## Compatibility
170170

171-
Projects maintained by the unified collective are compatible with all maintained
171+
Projects maintained by the unified collective are compatible with maintained
172172
versions of Node.js.
173-
As of now, that is Node.js 14.14+ and 16.0+.
174-
Our projects sometimes work with older versions, but this is not guaranteed.
173+
174+
When we cut a new major release, we drop support for unmaintained versions of
175+
Node.
176+
This means we try to keep the current release line, `hast-util-excerpt@^1`,
177+
compatible with Node.js 12.
175178

176179
## Security
177180

@@ -216,9 +219,9 @@ abide by its terms.
216219

217220
[downloads]: https://www.npmjs.com/package/hast-util-excerpt
218221

219-
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-excerpt.svg
222+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-excerpt
220223

221-
[size]: https://bundlephobia.com/result?p=hast-util-excerpt
224+
[size]: https://bundlejs.com/?q=hast-util-excerpt
222225

223226
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
224227

@@ -260,8 +263,8 @@ abide by its terms.
260263

261264
[rehype-meta]: https://github.com/rehypejs/rehype-meta
262265

263-
[excerpt]: #excerpttree-options
266+
[node]: https://github.com/syntax-tree/hast#nodes
264267

265-
[options]: #options
268+
[api-excerpt]: #excerpttree-options
266269

267-
[node]: https://github.com/syntax-tree/hast#nodes
270+
[api-options]: #options

0 commit comments

Comments
 (0)