@@ -49,7 +49,7 @@ a document, for use with [`rehype-meta`][rehype-meta].
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 hast-util-excerpt
@@ -115,7 +115,7 @@ console.log(excerpt(tree));
115
115
116
116
## API
117
117
118
- This package exports the identifier [ ` excerpt ` ] [ excerpt ] .
118
+ This package exports the identifier [ ` excerpt ` ] [ api- excerpt] .
119
119
There is no default export.
120
120
121
121
### ` excerpt(tree[, options]) `
@@ -126,12 +126,12 @@ Truncate `tree` to a certain comment.
126
126
127
127
* ` tree ` ([ ` Node ` ] [ node ] )
128
128
— tree to truncate
129
- * ` options ` ([ ` Options ` ] [ options ] )
129
+ * ` options ` ([ ` Options ` ] [ api- options] )
130
130
— configuration (optional)
131
131
132
132
###### Returns
133
133
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 `
135
135
otherwise.
136
136
137
137
### ` Options `
@@ -164,14 +164,17 @@ The syntax tree is [hast][].
164
164
## Types
165
165
166
166
This package is fully typed with [ TypeScript] [ ] .
167
- It exports the additional type [ ` Options ` ] [ options ] .
167
+ It exports the additional type [ ` Options ` ] [ api- options] .
168
168
169
169
## Compatibility
170
170
171
- Projects maintained by the unified collective are compatible with all maintained
171
+ Projects maintained by the unified collective are compatible with maintained
172
172
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.
175
178
176
179
## Security
177
180
@@ -216,9 +219,9 @@ abide by its terms.
216
219
217
220
[ downloads ] : https://www.npmjs.com/package/hast-util-excerpt
218
221
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
220
223
221
- [ size ] : https://bundlephobia .com/result?p =hast-util-excerpt
224
+ [ size ] : https://bundlejs .com/?q =hast-util-excerpt
222
225
223
226
[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
224
227
@@ -260,8 +263,8 @@ abide by its terms.
260
263
261
264
[ rehype-meta ] : https://github.com/rehypejs/rehype-meta
262
265
263
- [ excerpt ] : #excerpttree-options
266
+ [ node ] : https://github.com/syntax-tree/hast#nodes
264
267
265
- [ options ] : #options
268
+ [ api-excerpt ] : #excerpttree- options
266
269
267
- [ node ] : https://github.com/syntax-tree/hast#nodes
270
+ [ api-options ] : #options
0 commit comments