We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd4f350 commit a14d311Copy full SHA for a14d311
readme.md
@@ -24,17 +24,17 @@ npm install unist-util-visit
24
## Use
25
26
```js
27
-var u = require('unist-builder')
28
-var visit = require('unist-util-visit')
+import {u} from 'unist-builder'
+import {visit} from 'unist-util-visit'
29
30
-var tree = u('tree', [
+const tree = u('tree', [
31
u('leaf', '1'),
32
u('node', [u('leaf', '2')]),
33
u('void'),
34
u('leaf', '3')
35
])
36
37
-visit(tree, 'leaf', function(node) {
+visit(tree, 'leaf', (node) => {
38
console.log(node)
39
})
40
```
0 commit comments