Skip to content

Commit 0a4f3c6

Browse files
committed
Refactor docs
1 parent 3138bc7 commit 0a4f3c6

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

readme.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ turning line endings into `<br>`s
5454
## Install
5555

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

5959
```sh
6060
npm install hast-util-to-text
@@ -102,7 +102,7 @@ Delta echo foxtrot.
102102

103103
## API
104104

105-
This package exports the identifier [`toText`][totext].
105+
This package exports the identifier [`toText`][api-to-text].
106106
There is no default export.
107107

108108
### `toText(tree[, options])`
@@ -113,7 +113,7 @@ Get the plain-text value of a node.
113113

114114
* `tree` ([`Node`][node])
115115
— tree to turn into text
116-
* `options` ([`Options`][options], optional)
116+
* `options` ([`Options`][api-options], optional)
117117
— configuration
118118

119119
###### Returns
@@ -149,7 +149,7 @@ Configuration (TypeScript type).
149149

150150
##### Fields
151151

152-
* `whitespace` ([`Whitespace`][whitespace], default: `'normal'`)
152+
* `whitespace` ([`Whitespace`][api-whitespace], default: `'normal'`)
153153
— default whitespace setting to use
154154

155155
### `Whitespace`
@@ -159,21 +159,24 @@ Valid and useful whitespace values (from [CSS][]) (TypeScript type).
159159
##### Type
160160

161161
```ts
162-
type Whitespace = 'normal' | 'pre' | 'nowrap' | 'pre-wrap'
162+
type Whitespace = 'normal' | 'nowrap' | 'pre' | 'pre-wrap'
163163
```
164164
165165
## Types
166166
167167
This package is fully typed with [TypeScript][].
168-
It exports the additional types [`Options`][options] and
169-
[`Whitespace`][whitespace].
168+
It exports the additional types [`Options`][api-options] and
169+
[`Whitespace`][api-whitespace].
170170
171171
## Compatibility
172172
173-
Projects maintained by the unified collective are compatible with all maintained
173+
Projects maintained by the unified collective are compatible with maintained
174174
versions of Node.js.
175-
As of now, that is Node.js 14.14+ and 16.0+.
176-
Our projects sometimes work with older versions, but this is not guaranteed.
175+
176+
When we cut a new major release, we drop support for unmaintained versions of
177+
Node.
178+
This means we try to keep the current release line, `hast-util-to-text@^3`,
179+
compatible with Node.js 12.
177180
178181
## Security
179182
@@ -217,9 +220,9 @@ abide by its terms.
217220
218221
[downloads]: https://www.npmjs.com/package/hast-util-to-text
219222
220-
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-to-text.svg
223+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-to-text
221224
222-
[size]: https://bundlephobia.com/result?p=hast-util-to-text
225+
[size]: https://bundlejs.com/?q=hast-util-to-text
223226
224227
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
225228
@@ -273,8 +276,8 @@ abide by its terms.
273276
274277
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
275278
276-
[totext]: #totexttree-options
279+
[api-to-text]: #totexttree-options
277280
278-
[options]: #options
281+
[api-options]: #options
279282
280-
[whitespace]: #whitespace
283+
[api-whitespace]: #whitespace

0 commit comments

Comments
 (0)