Skip to content

Commit 466df72

Browse files
committed
Refactor docs
1 parent f43da7a commit 466df72

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

readme.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ That turns hast into HTML.
5757
## Install
5858

5959
This package is [ESM only][esm].
60-
In Node.js (version 16.0+), install with [npm][]:
60+
In Node.js (version 16+), install with [npm][]:
6161

6262
```sh
6363
npm install hast-util-from-html-isomorphic
@@ -66,14 +66,14 @@ npm install hast-util-from-html-isomorphic
6666
In Deno with [`esm.sh`][esmsh]:
6767

6868
```js
69-
import {fromHtmlIsomorphic} from "https://esm.sh/hast-util-from-html-isomorphic@1"
69+
import {fromHtmlIsomorphic} from 'https://esm.sh/hast-util-from-html-isomorphic@1'
7070
```
7171

7272
In browsers with [`esm.sh`][esmsh]:
7373

7474
```html
7575
<script type="module">
76-
import {fromHtmlIsomorphic} from "https://esm.sh/hast-util-from-html-isomorphic@1?bundle"
76+
import {fromHtmlIsomorphic} from 'https://esm.sh/hast-util-from-html-isomorphic@1?bundle'
7777
</script>
7878
```
7979

@@ -105,7 +105,8 @@ Yields (positional info and data omitted for brevity):
105105

106106
## API
107107

108-
This package exports the identifier [`fromHtmlIsomorphic`][fromhtmlisomorphic].
108+
This package exports the identifier
109+
[`fromHtmlIsomorphic`][api-from-html-isomorphic].
109110
There is no default export.
110111

111112
### `fromHtmlIsomorphic(value[, options])`
@@ -114,9 +115,9 @@ Turn serialized HTML into a hast tree.
114115

115116
###### Parameters
116117

117-
* `value` ([`Compatible`][compatible])
118+
* `value` (`string`)
118119
— serialized HTML to parse
119-
* `options` ([`Options`][options], optional)
120+
* `options` ([`Options`][api-options], optional)
120121
— configuration
121122

122123
###### Returns
@@ -184,14 +185,17 @@ followed by browsers such as Chrome and Firefox.
184185
## Types
185186

186187
This package is fully typed with [TypeScript][].
187-
It exports the additional type [`Options`][options].
188+
It exports the additional type [`Options`][api-options].
188189

189190
## Compatibility
190191

191-
Projects maintained by the unified collective are compatible with all maintained
192+
Projects maintained by the unified collective are compatible with maintained
192193
versions of Node.js.
193-
As of now, that is Node.js 16.0+.
194-
Our projects sometimes work with older versions, but this is not guaranteed.
194+
195+
When we cut a new major release, we drop support for unmaintained versions of
196+
Node.
197+
This means we try to keep the current release line,
198+
`hast-util-from-html-isomorphic@^1`, compatible with Node.js 16.
195199

196200
## Security
197201

@@ -240,9 +244,9 @@ abide by its terms.
240244

241245
[downloads]: https://www.npmjs.com/package/hast-util-from-html-isomorphic
242246

243-
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-from-html-isomorphic.svg
247+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-from-html-isomorphic
244248

245-
[size]: https://bundlephobia.com/result?p=hast-util-from-html-isomorphic
249+
[size]: https://bundlejs.com/?q=hast-util-from-html-isomorphic
246250

247251
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
248252

@@ -292,8 +296,6 @@ abide by its terms.
292296

293297
[xast-util-from-xml]: https://github.com/syntax-tree/xast-util-from-xml
294298

295-
[fromhtmlisomorphic]: #fromhtmlisomorphicvalue-options
296-
297-
[options]: #options
299+
[api-from-html-isomorphic]: #fromhtmlisomorphicvalue-options
298300

299-
[compatible]: https://github.com/vfile/vfile/blob/03efac7/lib/index.js#L16
301+
[api-options]: #options

0 commit comments

Comments
 (0)