Skip to content

Commit 4e621cf

Browse files
committed
Refactor docs
1 parent cb27e16 commit 4e621cf

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

readme.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ wraps this utility to figure, for use with [`rehype-meta`][rehype-meta].
4545
## Install
4646

4747
This package is [ESM only][esm].
48-
In Node.js (version 14.14+ and or 16.0+), install with [npm][]:
48+
In Node.js (version 16.0+), install with [npm][]:
4949

5050
```sh
5151
npm install hast-util-reading-time
@@ -61,7 +61,7 @@ In browsers with [`esm.sh`][esmsh]:
6161

6262
```html
6363
<script type="module">
64-
import {readingTime} from "https://esm.sh/hast-util-reading-time@1?bundle"
64+
import {readingTime} from 'https://esm.sh/hast-util-reading-time@1?bundle'
6565
</script>
6666
```
6767

@@ -99,7 +99,7 @@ It takes about 2-3m to read
9999

100100
## API
101101

102-
This package exports the identifier [`readingTime`][readingtime].
102+
This package exports the identifier [`readingTime`][api-reading-time].
103103
There is no default export.
104104

105105
### `readingTime(tree[, options])`
@@ -130,7 +130,7 @@ The algorithm works as follows:
130130

131131
* `tree` ([`Node`][node])
132132
— tree to inspect
133-
* `options` ([`Options`][options])
133+
* `options` ([`Options`][api-options], optional)
134134
— configuration
135135

136136
###### Returns
@@ -157,14 +157,17 @@ expect your readers to all be college graduates, etc.
157157
## Types
158158

159159
This package is fully typed with [TypeScript][].
160-
It exports the additional type [`Options`][options].
160+
It exports the additional type [`Options`][api-options].
161161

162162
## Compatibility
163163

164-
Projects maintained by the unified collective are compatible with all maintained
164+
Projects maintained by the unified collective are compatible with maintained
165165
versions of Node.js.
166-
As of now, that is Node.js 14.14+ and 16.0+.
167-
Our projects sometimes work with older versions, but this is not guaranteed.
166+
167+
When we cut a new major release, we drop support for unmaintained versions of
168+
Node.
169+
This means we try to keep the current release line,
170+
`hast-util-reading-time@^1`, compatible with Node.js 12.
168171

169172
## Security
170173

@@ -205,9 +208,9 @@ abide by its terms.
205208

206209
[downloads]: https://www.npmjs.com/package/hast-util-reading-time
207210

208-
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-reading-time.svg
211+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-reading-time
209212

210-
[size]: https://bundlephobia.com/result?p=hast-util-reading-time
213+
[size]: https://bundlejs.com/?q=hast-util-reading-time
211214

212215
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
213216

@@ -265,6 +268,6 @@ abide by its terms.
265268

266269
[martech]: https://martech.org/estimated-reading-times-increase-engagement/
267270

268-
[readingtime]: #readingtimetree-options
271+
[api-reading-time]: #readingtimetree-options
269272

270-
[options]: #options
273+
[api-options]: #options

0 commit comments

Comments
 (0)