Skip to content

Commit bc0bce7

Browse files
committed
Refactor docs
1 parent 2a3a9ce commit bc0bce7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

readme.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@
1010
npm install unist-util-inspect
1111
```
1212

13-
**unist-util-inspect** is also available as an AMD, CommonJS, and
14-
globals module, [uncompressed and compressed][releases].
15-
1613
## Usage
1714

1815
```javascript
1916
var retext = require('retext');
2017
var inspect = require('unist-util-inspect');
2118

22-
retext().use(function () {
23-
return function (cst) {
24-
console.log(inspect(cst));
25-
}
26-
}).process('Some simple text.');
19+
retext().use(plugin).process('Some simple text.');
20+
21+
function plugin() {
22+
return transformer;
23+
function transformer(tree) {
24+
console.log(inspect(tree));
25+
}
26+
}
2727
```
2828

2929
Yields:
@@ -50,11 +50,13 @@ RootNode[1] (1:1-1:18, 0-17)
5050
By default, color support is enabled on Node.js and turned off anywhere else.
5151
See below on how to change that.
5252

53-
**Parameters**
53+
###### Parameters
5454

5555
* `node` ([`Node`][node]).
5656

57-
**Returns** `string` — String representing `node`.
57+
###### Returns
58+
59+
`string` — String representing `node`.
5860

5961
### `inspect.<style>[.<style>...](node)`
6062

@@ -81,8 +83,6 @@ or `inspect.noColor(node)`.
8183

8284
[npm]: https://docs.npmjs.com/cli/install
8385

84-
[releases]: https://github.com/wooorm/unist-util-inspect/releases
85-
8686
[node]: https://github.com/wooorm/unist#unist-nodes
8787

8888
[license]: LICENSE

0 commit comments

Comments
 (0)