Skip to content

Commit 96cc7ed

Browse files
committed
Refactor prose
1 parent 25d66c4 commit 96cc7ed

File tree

1 file changed

+43
-19
lines changed

1 file changed

+43
-19
lines changed

readme.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
# hast-util-has-property [![Build][build-badge]][build] [![Coverage][coverage-badge]][coverage] [![Downloads][downloads-badge]][downloads] [![Chat][chat-badge]][chat]
1+
# hast-util-has-property
22

3-
Check whether a [HAST node][hast] is an [element][] with a [property][].
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 check if an [*element*][element] has a
12+
[*property*][property].
13+
14+
## Install
615

716
[npm][]:
817

9-
```bash
18+
```sh
1019
npm install hast-util-has-property
1120
```
1221

1322
## Usage
1423

15-
```javascript
24+
```js
1625
var has = require('hast-util-has-property')
1726

1827
has({type: 'text', value: 'alpha'}, 'bravo') // => false
@@ -42,25 +51,28 @@ has(
4251

4352
### `hasProperty(node, name)`
4453

45-
Check if `node` has a set `name` property.
54+
Check if `node` is an [*element*][element] that has a `name`
55+
[*property name*][property].
4656

4757
###### Parameters
4858

49-
* `node` ([`Node`][node], optional) — Node to check.
50-
* `name` ([`string`][property]) - Property name to check.
59+
* `node` ([`Node`][node], optional) — [*Node*][node] to check
60+
* `name` (`string`) - [*Property name*][property]
5161

5262
###### Returns
5363

54-
`boolean` — Whether `node` is an [`Element`][element] with a property
55-
by `name`.
64+
`boolean` — Whether `node` is an [*element*][element] that has a `name`
65+
[*property name*][property].
5666

5767
## Contribute
5868

59-
See [`contributing.md` in `syntax-tree/hast`][contributing] for ways to get
69+
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
6070
started.
71+
See [`support.md`][support] for ways to get help.
6172

62-
This organisation has a [Code of Conduct][coc]. By interacting with this
63-
repository, organisation, or community you agree to abide by its terms.
73+
This project has a [Code of Conduct][coc].
74+
By interacting with this repository, organisation, or community you agree to
75+
abide by its terms.
6476

6577
## License
6678

@@ -80,24 +92,36 @@ repository, organisation, or community you agree to abide by its terms.
8092

8193
[downloads]: https://www.npmjs.com/package/hast-util-has-property
8294

95+
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-has-property.svg
96+
97+
[size]: https://bundlephobia.com/result?p=hast-util-has-property
98+
99+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
100+
101+
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
102+
103+
[collective]: https://opencollective.com/unified
104+
83105
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
84106

85-
[chat]: https://spectrum.chat/unified/rehype
107+
[chat]: https://spectrum.chat/unified/syntax-tree
86108

87109
[npm]: https://docs.npmjs.com/cli/install
88110

89111
[license]: license
90112

91113
[author]: https://wooorm.com
92114

115+
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
116+
117+
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
118+
119+
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
120+
93121
[hast]: https://github.com/syntax-tree/hast
94122

95-
[node]: https://github.com/syntax-tree/unist#node
123+
[node]: https://github.com/syntax-tree/hast#nodes
96124

97125
[element]: https://github.com/syntax-tree/hast#element
98126

99127
[property]: https://github.com/syntax-tree/hast#property-names
100-
101-
[contributing]: https://github.com/syntax-tree/hast/blob/master/contributing.md
102-
103-
[coc]: https://github.com/syntax-tree/hast/blob/master/code-of-conduct.md

0 commit comments

Comments
 (0)