Skip to content

Commit 474d197

Browse files
committed
Refactor prose
1 parent c52b00e commit 474d197

File tree

1 file changed

+44
-15
lines changed

1 file changed

+44
-15
lines changed

readme.md

+44-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
# hast-util-assert [![Build][build-badge]][build] [![Coverage][coverage-badge]][coverage] [![Downloads][downloads-badge]][downloads] [![Chat][chat-badge]][chat]
1+
# hast-util-assert
22

3-
Assert [HAST][] nodes.
3+
[![Build][build-badge]][build]
4+
[![Coverage][coverage-badge]][coverage]
5+
[![Downloads][downloads-badge]][downloads]
6+
[![Size][size-badge]][size]
7+
[![Sponsors][sponsors-badge]][collective]
8+
[![Backers][backers-badge]][collective]
9+
[![Chat][chat-badge]][chat]
410

5-
## Installation
11+
[**hast**][hast] utility to assert trees.
12+
13+
## Install
614

715
[npm][]:
816

9-
```bash
17+
```sh
1018
npm install hast-util-assert
1119
```
1220

1321
## Usage
1422

15-
```javascript
23+
```js
1624
var assert = require('hast-util-assert')
1725

1826
assert({type: 'root', children: []})
@@ -28,21 +36,24 @@ assert({type: 'element', properties: {}, children: []})
2836

2937
## API
3038

31-
### `assert(node)`
39+
### `assert(tree)`
3240

33-
Assert that `node` is a valid [HAST][] node. If `node` has `children`,
34-
all children will be asserted as well.
41+
Assert that the given `tree` is a valid [**hast**][hast] [*tree*][tree].
42+
If `tree` is a [*parent*][parent], all [*children*][child] will be asserted as
43+
well.
3544

3645
The `assert.parent`, `assert.text`, `assert.void`, and `assert.wrap`
3746
methods from [`unist-util-assert`][unist-util-assert] are also included.
3847

3948
## Contribute
4049

41-
See [`contributing.md` in `syntax-tree/hast`][contributing] for ways to get
50+
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
4251
started.
52+
See [`support.md`][support] for ways to get help.
4353

44-
This organisation has a [Code of Conduct][coc]. By interacting with this
45-
repository, organisation, or community you agree to abide by its terms.
54+
This project has a [Code of Conduct][coc].
55+
By interacting with this repository, organisation, or community you agree to
56+
abide by its terms.
4657

4758
## License
4859

@@ -62,20 +73,38 @@ repository, organisation, or community you agree to abide by its terms.
6273

6374
[downloads]: https://www.npmjs.com/package/hast-util-assert
6475

76+
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-assert.svg
77+
78+
[size]: https://bundlephobia.com/result?p=hast-util-assert
79+
80+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
81+
82+
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
83+
84+
[collective]: https://opencollective.com/unified
85+
6586
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
6687

67-
[chat]: https://spectrum.chat/unified/rehype
88+
[chat]: https://spectrum.chat/unified/syntax-tree
6889

6990
[npm]: https://docs.npmjs.com/cli/install
7091

7192
[license]: license
7293

7394
[author]: https://wooorm.com
7495

75-
[hast]: https://github.com/syntax-tree/hast
96+
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
97+
98+
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
99+
100+
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
76101

77102
[unist-util-assert]: https://github.com/syntax-tree/unist-util-assert
78103

79-
[contributing]: https://github.com/syntax-tree/hast/blob/master/contributing.md
104+
[tree]: https://github.com/syntax-tree/unist#tree
80105

81-
[coc]: https://github.com/syntax-tree/hast/blob/master/code-of-conduct.md
106+
[parent]: https://github.com/syntax-tree/unist#parent-1
107+
108+
[child]: https://github.com/syntax-tree/unist#child
109+
110+
[hast]: https://github.com/syntax-tree/hast

0 commit comments

Comments
 (0)