Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit d6e440b

Browse files
committed
Refactor example in readme.md
1 parent c593e58 commit d6e440b

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

readme.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,10 @@ npm install hast-to-hyperscript
1212

1313
## Usage
1414

15-
Dependencies:
16-
1715
```javascript
1816
var toH = require('hast-to-hyperscript');
1917
var h = require('hyperscript');
20-
```
2118

22-
AST:
23-
24-
```javascript
2519
var tree = { type: 'element',
2620
tagName: 'p',
2721
properties: { id: 'alpha', className: [ 'bravo' ] },
@@ -36,11 +30,8 @@ var tree = { type: 'element',
3630
value: 'delta' } ] },
3731
{ type: 'text',
3832
value: ' echo.' } ] }
39-
```
40-
41-
Transform (`hyperscript` needs `outerHTML` to stringify):
4233

43-
```javascript
34+
// Transform (`hyperscript` needs `outerHTML` to stringify):
4435
var doc = toH(h, tree).outerHTML;
4536
```
4637

0 commit comments

Comments
 (0)