Skip to content

Commit 7353ce6

Browse files
committed
Refactor docs
1 parent a0e1140 commit 7353ce6

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

Diff for: lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const own = {}.hasOwnProperty
5050
const one = zwitch('type', {handlers: {root, element, text, comment, doctype}})
5151

5252
/**
53-
* Transform a hast tree to Parse5’s AST.
53+
* Transform a hast tree to a `parse5` AST.
5454
*
5555
* @param {Nodes} tree
5656
* Tree to transform.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hast-util-to-parse5",
33
"version": "7.1.0",
4-
"description": "hast utility to transform hast to Parse5’s AST",
4+
"description": "hast utility to transform to a `parse5` AST",
55
"license": "MIT",
66
"keywords": [
77
"unist",

Diff for: readme.md

+20-16
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Backers][backers-badge]][collective]
99
[![Chat][chat-badge]][chat]
1010

11-
[hast][] utility to generate [`parse5`][parse5]s [AST][parse5-node].
11+
[hast][] utility to transform to a [`parse5`][parse5] [AST][parse5-node].
1212

1313
## Contents
1414

@@ -29,7 +29,7 @@
2929

3030
## What is this?
3131

32-
This package is a utility that can turn a hast syntax tree into `parse5`s AST.
32+
This package is a utility that can turn a hast syntax tree into a `parse5` AST.
3333
Why not use a Parse5 adapter, you might ask?
3434
Well, because it’s more code weight to use adapters, and more fragile.
3535

@@ -43,7 +43,7 @@ likely what you want.
4343
## Install
4444

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

4848
```sh
4949
npm install hast-util-to-parse5
@@ -90,18 +90,18 @@ Yields:
9090

9191
## API
9292

93-
This package exports the identifier [`toParse5`][toparse5].
93+
This package exports the identifier [`toParse5`][api-to-parse5].
9494
There is no default export.
9595

9696
### `toParse5(tree[, options])`
9797

98-
Transform a hast tree to Parse5’s AST.
98+
Transform a hast tree to a `parse5` AST.
9999

100100
###### Parameters
101101

102102
* `tree` ([`HastNode`][hast-node])
103103
— tree to transform
104-
* `options` ([`Options`][options], optional)
104+
* `options` ([`Options`][api-options], optional)
105105
— configuration
106106

107107
###### Returns
@@ -114,7 +114,7 @@ Configuration (TypeScript type).
114114

115115
###### Fields
116116

117-
* `space` ([`Space`][space], optional)
117+
* `space` ([`Space`][api-space], optional)
118118
— which space the document is in
119119

120120
### `Space`
@@ -130,14 +130,18 @@ type Space = 'html' | 'svg'
130130
## Types
131131
132132
This package is fully typed with [TypeScript][].
133-
It exports the additional types [`Options`][options] and [`Space`][space].
133+
It exports the additional types [`Options`][api-options] and
134+
[`Space`][api-space].
134135
135136
## Compatibility
136137
137-
Projects maintained by the unified collective are compatible with all maintained
138+
Projects maintained by the unified collective are compatible with maintained
138139
versions of Node.js.
139-
As of now, that is Node.js 14.14+ and 16.0+.
140-
Our projects sometimes work with older versions, but this is not guaranteed.
140+
141+
When we cut a new major release, we drop support for unmaintained versions of
142+
Node.
143+
This means we try to keep the current release line, `hast-util-to-parse5@^7`,
144+
compatible with Node.js 12.
141145
142146
## Security
143147
@@ -187,9 +191,9 @@ abide by its terms.
187191
188192
[downloads]: https://www.npmjs.com/package/hast-util-to-parse5
189193
190-
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-to-parse5.svg
194+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-to-parse5
191195
192-
[size]: https://bundlephobia.com/result?p=hast-util-to-parse5
196+
[size]: https://bundlejs.com/?q=hast-util-to-parse5
193197
194198
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
195199
@@ -233,8 +237,8 @@ abide by its terms.
233237
234238
[hast-util-from-parse5]: https://github.com/syntax-tree/hast-util-from-parse5
235239
236-
[toparse5]: #toparse5tree-options
240+
[api-to-parse5]: #toparse5tree-options
237241
238-
[options]: #options
242+
[api-options]: #options
239243
240-
[space]: #space
244+
[api-space]: #space

0 commit comments

Comments
 (0)