Skip to content

Commit 5382cf8

Browse files
committed
Refactor prose
1 parent 1a8cad7 commit 5382cf8

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

readme.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
[![Backers][backers-badge]][collective]
99
[![Chat][chat-badge]][chat]
1010

11-
[**Unist**][unist] utility to check if a node passes a test.
11+
[**unist**][unist] utility to check if a node passes a test.
1212

13-
## Installation
13+
## Install
1414

1515
[npm][]:
1616

17-
```bash
17+
```sh
1818
npm install unist-util-is
1919
```
2020

@@ -53,20 +53,19 @@ is(test, node, 5, parent) // => true
5353

5454
* `test` ([`Function`][test], `string`, `Object`, or `Array.<Test>`, optional)
5555
— When not given, checks if `node` is a [`Node`][node].
56-
When `string`, works like passing `function (node) {return
57-
node.type === test}`.
58-
When `array`, checks any one of the subtests pass.
56+
When `string`, works like passing `node => node.type === test`.
57+
When `array`, checks if any one of the subtests pass.
5958
When `object`, checks that all keys in `test` are in `node`,
60-
and that they have (strictly) equal values
59+
and that they have strictly equal values
6160
* `node` ([`Node`][node]) — Node to check. `false` is returned
62-
* `index` (`number`, optional) — Position of `node` in `parent`
63-
* `parent` (`Node`, optional) — Parent of `node`
61+
* `index` (`number`, optional) — [Index][] of `node` in `parent`
62+
* `parent` ([`Node`][node], optional) — [Parent][] of `node`
6463
* `context` (`*`, optional) — Context object to invoke `test` with
6564

6665
###### Returns
6766

6867
`boolean` — Whether `test` passed *and* `node` is a [`Node`][node] (object
69-
with `type` set to non-empty `string`).
68+
with `type` set to a non-empty `string`).
7069

7170
#### `function test(node[, index, parent])`
7271

@@ -105,11 +104,13 @@ with `type` set to non-empty `string`).
105104

106105
## Contribute
107106

108-
See [`contributing.md` in `syntax-tree/unist`][contributing] for ways to get
107+
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
109108
started.
109+
See [`support.md`][support] for ways to get help.
110110

111-
This organisation has a [Code of Conduct][coc]. By interacting with this
112-
repository, organisation, or community you agree to abide by its terms.
111+
This project has a [Code of Conduct][coc].
112+
By interacting with this repository, organisation, or community you agree to
113+
abide by its terms.
113114

114115
## License
115116

@@ -149,12 +150,18 @@ repository, organisation, or community you agree to abide by its terms.
149150

150151
[author]: https://wooorm.com
151152

153+
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
154+
155+
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
156+
157+
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
158+
152159
[unist]: https://github.com/syntax-tree/unist
153160

154161
[node]: https://github.com/syntax-tree/unist#node
155162

156-
[test]: #function-testnode-index-parent
163+
[parent]: https://github.com/syntax-tree/unist#parent-1
157164

158-
[contributing]: https://github.com/syntax-tree/unist/blob/master/contributing.md
165+
[index]: https://github.com/syntax-tree/unist#index
159166

160-
[coc]: https://github.com/syntax-tree/unist/blob/master/code-of-conduct.md
167+
[test]: #function-testnode-index-parent

0 commit comments

Comments
 (0)