1010npm 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
1916var retext = require (' retext' );
2017var 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
2929Yields:
@@ -50,11 +50,13 @@ RootNode[1] (1:1-1:18, 0-17)
5050By default, color support is enabled on Node.js and turned off anywhere else.
5151See 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