10
10
11
11
[ ** unist** ] [ unist ] utility to find a node after another node.
12
12
13
- ## Installation
13
+ ## Install
14
14
15
15
[ npm] [ ] :
16
16
17
17
``` sh
18
18
npm install unist-util-find-after
19
19
```
20
20
21
- ## Usage
21
+ ## Use
22
22
23
23
``` js
24
24
var u = require (' unist-builder' )
@@ -40,7 +40,7 @@ console.log(findAfter(tree, 1, 'node'))
40
40
Yields:
41
41
42
42
``` js
43
- { type: ' node' , children: [ { type: ' leaf' , value: ' leaf 5' } ] }
43
+ {type: ' node' , children: [{ type: ' leaf' , value: ' leaf 5' }] }
44
44
```
45
45
46
46
## API
@@ -64,6 +64,17 @@ Find the first [child][] after `index` (or `node`) in `parent`, that passes
64
64
65
65
## Related
66
66
67
+ * [ ` unist-util-visit ` ] ( https://github.com/syntax-tree/unist-util-visit )
68
+ — Recursively walk over nodes
69
+ * [ ` unist-util-visit-parents ` ] ( https://github.com/syntax-tree/unist-util-visit-parents )
70
+ — Like ` visit ` , but with a stack of parents
71
+ * [ ` unist-util-filter ` ] ( https://github.com/eush77/unist-util-filter )
72
+ — Create a new tree with all nodes that pass a test
73
+ * [ ` unist-util-map ` ] ( https://github.com/syntax-tree/unist-util-map )
74
+ — Create a new tree with all nodes mapped by a given function
75
+ * [ ` unist-util-flatmap ` ] ( https://gitlab.com/staltz/unist-util-flatmap )
76
+ — Create a new tree by mapping (to an array) with the provided function and
77
+ then flattening
67
78
* [ ` unist-util-find-before ` ] ( https://github.com/syntax-tree/unist-util-find-before )
68
79
— Find a node before another node
69
80
* [ ` unist-util-find-all-after ` ] ( https://github.com/syntax-tree/unist-util-find-all-after )
@@ -72,8 +83,10 @@ Find the first [child][] after `index` (or `node`) in `parent`, that passes
72
83
— Find all nodes before another node
73
84
* [ ` unist-util-find-all-between ` ] ( https://github.com/mrzmmr/unist-util-find-all-between )
74
85
— Find all nodes between two nodes
75
- * [ ` unist-util-find ` ] ( https://github.com/blahah/unist-util-find )
76
- — Find nodes matching a predicate
86
+ * [ ` unist-util-remove ` ] ( https://github.com/eush77/unist-util-remove )
87
+ — Remove nodes from a tree that pass a test
88
+ * [ ` unist-util-select ` ] ( https://github.com/eush77/unist-util-select )
89
+ — Select nodes with CSS-like selectors
77
90
78
91
## Contribute
79
92
@@ -113,7 +126,7 @@ abide by its terms.
113
126
114
127
[ collective ] : https://opencollective.com/unified
115
128
116
- [ chat-badge ] : https://img.shields.io/badge/join%20the%20community-on%20spectrum -7b16ff.svg
129
+ [ chat-badge ] : https://img.shields.io/badge/chat-spectrum -7b16ff.svg
117
130
118
131
[ chat ] : https://spectrum.chat/unified/syntax-tree
119
132
0 commit comments