@@ -38,7 +38,7 @@ But this helps when integrating with the rest of unified and unist.
38
38
## Install
39
39
40
40
This package is [ ESM only] [ esm ] .
41
- In Node.js (version 12.20+, 14.14+, 16.0+, 18 .0+), install with [ npm] [ ] :
41
+ In Node.js (version 14.14+ and 16 .0+), install with [ npm] [ ] :
42
42
43
43
``` sh
44
44
npm install unist-util-find-after
@@ -47,14 +47,14 @@ npm install unist-util-find-after
47
47
In Deno with [ ` esm.sh ` ] [ esmsh ] :
48
48
49
49
``` js
50
- import {findAfter } from " https://esm.sh/unist-util-find-after@4"
50
+ import {findAfter } from ' https://esm.sh/unist-util-find-after@4'
51
51
```
52
52
53
53
In browsers with [ ` esm.sh ` ] [ esmsh ] :
54
54
55
55
``` html
56
56
<script type =" module" >
57
- import {findAfter } from " https://esm.sh/unist-util-find-after@4?bundle"
57
+ import {findAfter } from ' https://esm.sh/unist-util-find-after@4?bundle'
58
58
</script >
59
59
```
60
60
@@ -85,18 +85,28 @@ Yields:
85
85
86
86
## API
87
87
88
- This package exports the identifier ` findAfter ` .
88
+ This package exports the identifier [ ` findAfter ` ] [ api-findafter ] .
89
89
There is no default export.
90
90
91
91
### ` findAfter(parent, node|index[, test]) `
92
92
93
- Find the first node in ` parent ` ([ ` Parent ` ] [ parent ] ) after another ` node `
94
- ([ ` Node ` ] [ node ] ) or after an index, that passes ` test ` (` Test ` from
95
- [ ` unist-util-is ` ] [ test ] ).
93
+ Find the first node in ` parent ` after another ` node ` or after an index,
94
+ that passes ` test ` .
95
+
96
+ ###### Parameters
97
+
98
+ * ` parent ` ([ ` Node ` ] [ node ] )
99
+ — parent node
100
+ * ` index ` (` number ` )
101
+ — index of child in ` parent `
102
+ * ` child ` ([ ` Node ` ] [ node ] )
103
+ — child in ` parent `
104
+ * ` test ` ([ ` Test ` ] [ test ] )
105
+ — ` unist-util-is ` -compatible test
96
106
97
107
###### Returns
98
108
99
- Child of ` parent ` that passes ` test ` , if found ([ ` Node? ` ] [ node ] ).
109
+ Child of ` parent ` ([ ` Node ` ] [ node ] ) or ` null ` .
100
110
101
111
## Types
102
112
@@ -107,7 +117,7 @@ It exports no additional types (types for the test are in `unist-util-is`).
107
117
108
118
Projects maintained by the unified collective are compatible with all maintained
109
119
versions of Node.js.
110
- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
120
+ As of now, that is Node.js 14.14+ and 16 .0+.
111
121
Our projects sometimes work with older versions, but this is not guaranteed.
112
122
113
123
## Related
@@ -202,6 +212,6 @@ abide by its terms.
202
212
203
213
[ node ] : https://github.com/syntax-tree/unist#node
204
214
205
- [ parent ] : https://github.com/syntax-tree/unist#parent-1
206
-
207
215
[ test ] : https://github.com/syntax-tree/unist-util-is#test
216
+
217
+ [ api-findafter ] : #findafterparent-nodeindex-test
0 commit comments