Skip to content

Commit 5a08ea2

Browse files
committed
Refactor prose
1 parent 5b9fcb7 commit 5a08ea2

File tree

1 file changed

+45
-18
lines changed

1 file changed

+45
-18
lines changed

readme.md

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
# mdast-util-definitions [![Build][build-badge]][build] [![Coverage][coverage-badge]][coverage] [![Downloads][downloads-badge]][downloads] [![Chat][chat-badge]][chat]
1+
# mdast-util-definitions
22

3-
Get definitions in [mdast][] nodes by `identifier`. Supports funky
4-
keys, like `__proto__` or `toString`.
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]
510

6-
## Installation
11+
[**mdast**][mdast] utility to get definitions by `identifier`.
12+
13+
Supports funky keys, like `__proto__` or `toString`.
14+
15+
## Install
716

817
[npm][]:
918

10-
```bash
19+
```sh
1120
npm install mdast-util-definitions
1221
```
1322

@@ -32,35 +41,37 @@ definition('foo')
3241

3342
### `definitions(node[, options])`
3443

35-
Create a cache of all `definition`s in [`node`][node].
44+
Create a cache of all [definition][]s in [`node`][node].
3645

3746
###### `options.commonmark`
3847

3948
`boolean`, default: false — Turn on to use CommonMark precedence: ignore
40-
later found definitions for duplicate definitions. The default behaviour
41-
is to prefer the last found definition.
49+
definitions found later for duplicate definitions.
50+
The default behaviour is to prefer the last found definition.
4251

4352
###### Returns
4453

45-
[`Function`][definition]
54+
[`Function`][fn-definition]
4655

4756
### `definition(identifier)`
4857

4958
###### Parameters
5059

51-
* `identifier` (`string`) — Identifier of definition.
60+
* `identifier` (`string`) — [Identifier][] of [definition][].
5261

5362
###### Returns
5463

55-
[`Node?`][node] — Definition, if found.
64+
[`Node?`][node][Definition][], if found.
5665

5766
## Contribute
5867

59-
See [`contributing.md` in `syntax-tree/mdast`][contributing] for ways to get
68+
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
6069
started.
70+
See [`support.md`][support] for ways to get help.
6171

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.
72+
This project has a [Code of Conduct][coc].
73+
By interacting with this repository, organisation, or community you agree to
74+
abide by its terms.
6475

6576
## License
6677

@@ -80,22 +91,38 @@ repository, organisation, or community you agree to abide by its terms.
8091

8192
[downloads]: https://www.npmjs.com/package/mdast-util-definitions
8293

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

85-
[chat]: https://spectrum.chat/unified/remark
106+
[chat]: https://spectrum.chat/unified/syntax-tree
86107

87108
[license]: license
88109

89110
[author]: https://wooorm.com
90111

91112
[npm]: https://docs.npmjs.com/cli/install
92113

114+
[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
115+
116+
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
117+
118+
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
119+
93120
[mdast]: https://github.com/syntax-tree/mdast
94121

95122
[node]: https://github.com/syntax-tree/unist#node
96123

97-
[definition]: #definitionidentifier
124+
[fn-definition]: #definitionidentifier
98125

99-
[contributing]: https://github.com/syntax-tree/mdast/blob/master/contributing.md
126+
[definition]: https://github.com/syntax-tree/mdast#definition
100127

101-
[coc]: https://github.com/syntax-tree/mdast/blob/master/code-of-conduct.md
128+
[identifier]: https://github.com/syntax-tree/mdast#association

0 commit comments

Comments
 (0)