17
17
* [ Install] ( #install )
18
18
* [ Use] ( #use )
19
19
* [ API] ( #api )
20
- * [ ` findAllAfter(parent, node |index[, test]) ` ] ( #findallafterparent-nodeindex -test )
20
+ * [ ` findAllAfter(parent, child |index[, test]) ` ] ( #findallafterparent-childindex -test )
21
21
* [ Types] ( #types )
22
22
* [ Compatibility] ( #compatibility )
23
23
* [ Related] ( #related )
@@ -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-all-after
@@ -47,14 +47,14 @@ npm install unist-util-find-all-after
47
47
In Deno with [ ` esm.sh ` ] [ esmsh ] :
48
48
49
49
``` js
50
- import {findAllAfter } from " https://esm.sh/unist-util-find-all-after@4"
50
+ import {findAllAfter } from ' https://esm.sh/unist-util-find-all-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 {findAllAfter } from " https://esm.sh/unist-util-find-all-after@4?bundle"
57
+ import {findAllAfter } from ' https://esm.sh/unist-util-find-all-after@4?bundle'
58
58
</script >
59
59
```
60
60
@@ -89,18 +89,28 @@ Yields:
89
89
90
90
## API
91
91
92
- This package exports the identifier ` findAllAfter ` .
92
+ This package exports the identifier [ ` findAllAfter ` ] [ api-findallafter ] .
93
93
There is no default export.
94
94
95
- ### ` findAllAfter(parent, node |index[, test]) `
95
+ ### ` findAllAfter(parent, child |index[, test]) `
96
96
97
- Find the nodes in ` parent ` ([ ` Parent ` ] [ parent ] ) after another ` node `
98
- ([ ` Node ` ] [ node ] ) or after an index, that pass ` test ` (` Test ` from
99
- [ ` unist-util-is ` ] [ test ] ).
97
+ Find the nodes in ` parent ` before a ` child ` or before an index, that pass
98
+ ` test ` .
99
+
100
+ ###### Parameters
101
+
102
+ * ` parent ` ([ ` Node ` ] [ node ] )
103
+ — parent node
104
+ * ` index ` (` number ` )
105
+ — index of child in ` parent `
106
+ * ` child ` ([ ` Node ` ] [ node ] )
107
+ — child in ` parent `
108
+ * ` test ` ([ ` Test ` ] [ test ] )
109
+ — ` unist-util-is ` -compatible test
100
110
101
111
###### Returns
102
112
103
- Children of ` parent ` that pass ` test ` ([ ` Array<Node> ` ] [ node ] ).
113
+ Children of ` parent ` ([ ` Array<Node> ` ] [ node ] ).
104
114
105
115
## Types
106
116
@@ -111,7 +121,7 @@ It exports no additional types (types for the test are in `unist-util-is`).
111
121
112
122
Projects maintained by the unified collective are compatible with all maintained
113
123
versions of Node.js.
114
- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18 .0+.
124
+ As of now, that is Node.js 14.14+ and 16 .0+.
115
125
Our projects sometimes work with older versions, but this is not guaranteed.
116
126
117
127
## Related
@@ -207,6 +217,6 @@ abide by its terms.
207
217
208
218
[ node ] : https://github.com/syntax-tree/unist#node
209
219
210
- [ parent ] : https://github.com/syntax-tree/unist#parent-1
211
-
212
220
[ test ] : https://github.com/syntax-tree/unist-util-is#test
221
+
222
+ [ api-findallafter ] : #findallafterparent-childindex-test
0 commit comments