Skip to content

Commit 43e9be3

Browse files
committed
Add improved docs
1 parent 9b74cd9 commit 43e9be3

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import {convert} from 'unist-util-is'
77

88
/**
9-
* Check if the given value is phrasing content.
9+
* Check if the given value is *phrasing content*.
1010
*
1111
* @param
12-
* Thing to check, typically `Node`
12+
* Thing to check, typically `Node`.
1313
* @returns
1414
* Whether `node` is phrasing content.
1515
*/

readme.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* [Install](#install)
1818
* [Use](#use)
1919
* [API](#api)
20-
* [`phrasing(node)`](#phrasingnode)
20+
* [`phrasing(value)`](#phrasingvalue)
2121
* [Types](#types)
2222
* [Compatibility](#compatibility)
2323
* [Security](#security)
@@ -41,7 +41,7 @@ but on [hast][].
4141
## Install
4242

4343
This package is [ESM only][esm].
44-
In Node.js (version 12.20+, 14.14+, or 16.0+), install with [npm][]:
44+
In Node.js (version 14.14+ and 16.0+), install with [npm][]:
4545

4646
```sh
4747
npm install mdast-util-phrasing
@@ -75,16 +75,21 @@ phrasing({type: 'strong', children: [{type: 'text', value: 'Delta'}]})
7575

7676
## API
7777

78-
This package exports the identifier `phrasing`.
78+
This package exports the identifier [`phrasing`][api-phrasing].
7979
There is no default export.
8080

81-
### `phrasing(node)`
81+
### `phrasing(value)`
8282

83-
Check if the given value (`unknown`) is phrasing content.
83+
Check if the given value is *[phrasing content][phrasing]*.
84+
85+
###### Parameters
86+
87+
* `value` (`unknown`)
88+
— thing to check, typically [`Node`][node]
8489

8590
###### Returns
8691

87-
Whether `node` is [phrasing content][phrasing] (`boolean`).
92+
Whether `value` is phrasing content (`boolean`).
8893

8994
## Types
9095

@@ -95,7 +100,7 @@ It does not export extra types.
95100

96101
Projects maintained by the unified collective are compatible with all maintained
97102
versions of Node.js.
98-
As of now, that is Node.js 12.20+, 14.14+, and 16.0+.
103+
As of now, that is Node.js 14.14+ and 16.0+.
99104
Our projects sometimes work with older versions, but this is not guaranteed.
100105

101106
## Security
@@ -186,3 +191,5 @@ abide by its terms.
186191
[unist-util-is]: https://github.com/syntax-tree/unist-util-is
187192

188193
[hast-util-phrasing]: https://github.com/syntax-tree/hast-util-phrasing
194+
195+
[api-phrasing]: #phrasingvalue

0 commit comments

Comments
 (0)