Skip to content

Commit 8dd49af

Browse files
committed
Refactor prose
1 parent 349bb9a commit 8dd49af

File tree

1 file changed

+42
-15
lines changed

1 file changed

+42
-15
lines changed

readme.md

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

3-
Check whether a [HAST node][hast] is [labelable][spec].
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] is
12+
[*labelable*][spec].
13+
14+
## Install
615

716
[npm][]:
817

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

1322
## Usage
1423

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

1827
labelable({type: 'element', tagName: 'div'}) // => false
@@ -30,24 +39,28 @@ labelable({
3039

3140
### `labelable(node)`
3241

42+
Check if the given value is a [*labelable*][spec] [*element*][element].
43+
3344
###### Parameters
3445

35-
* `node` ([`Node`][node], optional) — Node to check.
46+
* `node` (`*`, optional) — Value to check, probably [`Node`][node]
3647

3748
###### Returns
3849

3950
`boolean` — Whether `node` is a labelable element.
4051
Labelable nodes have a `tagName` set to `button`, `keygen`,
4152
`meter`, `output`, `progress`, `select`, `textarea`, and `input`
42-
(excluding `[type=hidden]`.
53+
(excluding `[type=hidden]`).
4354

4455
## Contribute
4556

46-
See [`contributing.md` in `syntax-tree/hast`][contributing] for ways to get
57+
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
4758
started.
59+
See [`support.md`][support] for ways to get help.
4860

49-
This organisation has a [Code of Conduct][coc]. By interacting with this
50-
repository, organisation, or community you agree to abide by its terms.
61+
This project has a [Code of Conduct][coc].
62+
By interacting with this repository, organisation, or community you agree to
63+
abide by its terms.
5164

5265
## License
5366

@@ -67,22 +80,36 @@ repository, organisation, or community you agree to abide by its terms.
6780

6881
[downloads]: https://www.npmjs.com/package/hast-util-labelable
6982

83+
[size-badge]: https://img.shields.io/bundlephobia/minzip/hast-util-labelable.svg
84+
85+
[size]: https://bundlephobia.com/result?p=hast-util-labelable
86+
87+
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
88+
89+
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
90+
91+
[collective]: https://opencollective.com/unified
92+
7093
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
7194

72-
[chat]: https://spectrum.chat/unified/rehype
95+
[chat]: https://spectrum.chat/unified/syntax-tree
7396

7497
[npm]: https://docs.npmjs.com/cli/install
7598

7699
[license]: license
77100

78101
[author]: https://wooorm.com
79102

80-
[hast]: https://github.com/syntax-tree/hast
103+
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
104+
105+
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
106+
107+
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
81108

82109
[spec]: https://html.spec.whatwg.org/#category-label
83110

84-
[node]: https://github.com/syntax-tree/unist#node
111+
[hast]: https://github.com/syntax-tree/hast
85112

86-
[contributing]: https://github.com/syntax-tree/hast/blob/master/contributing.md
113+
[node]: https://github.com/syntax-tree/hast#nodes
87114

88-
[coc]: https://github.com/syntax-tree/hast/blob/master/code-of-conduct.md
115+
[element]: https://github.com/syntax-tree/hast#element

0 commit comments

Comments
 (0)