1212
1313## Contents
1414
15- * [ What is this?] ( #what-is-this )
16- * [ When should I use this?] ( #when-should-i-use-this )
17- * [ Install] ( #install )
18- * [ Use] ( #use )
19- * [ API] ( #api )
20- * [ ` is(node[, test[, index, parent[, context]]]) ` ] ( #isnode-test-index-parent-context )
21- * [ ` convert(test) ` ] ( #converttest )
22- * [ ` Check ` ] ( #check )
23- * [ ` Test ` ] ( #test )
24- * [ ` TestFunction ` ] ( #testfunction )
25- * [ Examples] ( #examples )
26- * [ Example of ` convert ` ] ( #example-of-convert )
27- * [ Types] ( #types )
28- * [ Compatibility] ( #compatibility )
29- * [ Related] ( #related )
30- * [ Contribute] ( #contribute )
31- * [ License] ( #license )
15+ * [ What is this?] ( #what-is-this )
16+ * [ When should I use this?] ( #when-should-i-use-this )
17+ * [ Install] ( #install )
18+ * [ Use] ( #use )
19+ * [ API] ( #api )
20+ * [ ` is(node[, test[, index, parent[, context]]]) ` ] ( #isnode-test-index-parent-context )
21+ * [ ` convert(test) ` ] ( #converttest )
22+ * [ ` Check ` ] ( #check )
23+ * [ ` Test ` ] ( #test )
24+ * [ ` TestFunction ` ] ( #testfunction )
25+ * [ Examples] ( #examples )
26+ * [ Example of ` convert ` ] ( #example-of-convert )
27+ * [ Types] ( #types )
28+ * [ Compatibility] ( #compatibility )
29+ * [ Related] ( #related )
30+ * [ Contribute] ( #contribute )
31+ * [ License] ( #license )
3232
3333## What is this?
3434
@@ -107,16 +107,16 @@ Check if `node` is a `Node` and whether it passes the given test.
107107
108108###### Parameters
109109
110- * ` node ` (` unknown ` , optional)
111- — thing to check, typically [ ` Node ` ] [ node ]
112- * ` test ` ([ ` Test ` ] [ api-test ] , optional)
113- — a test for a specific element
114- * ` index ` (` number ` , optional)
115- — the node’s position in its parent
116- * ` parent ` ([ ` Node ` ] [ node ] , optional)
117- — the node’s parent
118- * ` context ` (` unknown ` , optional)
119- — context object (` this ` ) to call ` test ` with
110+ * ` node ` (` unknown ` , optional)
111+ — thing to check, typically [ ` Node ` ] [ node ]
112+ * ` test ` ([ ` Test ` ] [ api-test ] , optional)
113+ — a test for a specific element
114+ * ` index ` (` number ` , optional)
115+ — the node’s position in its parent
116+ * ` parent ` ([ ` Node ` ] [ node ] , optional)
117+ — the node’s parent
118+ * ` context ` (` unknown ` , optional)
119+ — context object (` this ` ) to call ` test ` with
120120
121121###### Returns
122122
@@ -139,8 +139,8 @@ a `node`, `index`, and `parent`.
139139
140140###### Parameters
141141
142- * ` test ` ([ ` Test ` ] [ api-test ] , optional)
143- — a test for a specific node
142+ * ` test ` ([ ` Test ` ] [ api-test ] , optional)
143+ — a test for a specific node
144144
145145###### Returns
146146
@@ -152,14 +152,14 @@ Check that an arbitrary value is a node (TypeScript type).
152152
153153###### Parameters
154154
155- * ` this ` (` unknown ` , optional)
156- — context object (` this ` ) to call ` test ` with
157- * ` node ` (` unknown ` )
158- — anything (typically a node)
159- * ` index ` (` number ` , optional)
160- — the node’s position in its parent
161- * ` parent ` ([ ` Node ` ] [ node ] , optional)
162- — the node’s parent
155+ * ` this ` (` unknown ` , optional)
156+ — context object (` this ` ) to call ` test ` with
157+ * ` node ` (` unknown ` )
158+ — anything (typically a node)
159+ * ` index ` (` number ` , optional)
160+ — the node’s position in its parent
161+ * ` parent ` ([ ` Node ` ] [ node ] , optional)
162+ — the node’s parent
163163
164164###### Returns
165165
@@ -183,24 +183,24 @@ type Test =
183183
184184Checks that the given thing is a node, and then:
185185
186- * when ` string ` , checks that the node has that tag name
187- * when ` function ` , see [ ` TestFunction ` ][api-test-function]
188- * when ` object ` , checks that all keys in test are in node, and that they have
189- (strictly) equal values
190- * when ` Array ` , checks if one of the subtests pass
186+ * when ` string ` , checks that the node has that tag name
187+ * when ` function ` , see [ ` TestFunction ` ][api-test-function]
188+ * when ` object ` , checks that all keys in test are in node, and that they have
189+ (strictly) equal values
190+ * when ` Array ` , checks if one of the subtests pass
191191
192192### ` TestFunction `
193193
194194Check if a node passes a test (TypeScript type).
195195
196196###### Parameters
197197
198- * ` node ` ([ ` Node ` ][node])
199- — a node
200- * ` index ` ( ` number ` or ` undefined ` )
201- — the node’s position in its parent
202- * ` parent ` ([ ` Node ` ][node] or ` undefined ` )
203- — the node’s parent
198+ * ` node ` ([ ` Node ` ][node])
199+ — a node
200+ * ` index ` ( ` number ` or ` undefined ` )
201+ — the node’s position in its parent
202+ * ` parent ` ([ ` Node ` ][node] or ` undefined ` )
203+ — the node’s parent
204204
205205###### Returns
206206
@@ -255,20 +255,20 @@ compatible with Node.js 16.
255255
256256## Related
257257
258- * [ ` unist-util-find-after ` ] ( https://github.com/syntax-tree/unist-util-find-after )
259- — find a node after another node
260- * [ ` unist-util-find-before ` ] ( https://github.com/syntax-tree/unist-util-find-before )
261- — find a node before another node
262- * [ ` unist-util-find-all-after ` ] ( https://github.com/syntax-tree/unist-util-find-all-after )
263- — find all nodes after another node
264- * [ ` unist-util-find-all-before ` ] ( https://github.com/syntax-tree/unist-util-find-all-before )
265- — find all nodes before another node
266- * [ ` unist-util-find-all-between ` ] ( https://github.com/mrzmmr/unist-util-find-all-between )
267- — find all nodes between two nodes
268- * [ ` unist-util-filter ` ] ( https://github.com/syntax-tree/unist-util-filter )
269- — create a new tree with nodes that pass a check
270- * [ ` unist-util-remove ` ] ( https://github.com/syntax-tree/unist-util-remove )
271- — remove nodes from tree
258+ * [ ` unist-util-find-after ` ] ( https://github.com/syntax-tree/unist-util-find-after )
259+ — find a node after another node
260+ * [ ` unist-util-find-before ` ] ( https://github.com/syntax-tree/unist-util-find-before )
261+ — find a node before another node
262+ * [ ` unist-util-find-all-after ` ] ( https://github.com/syntax-tree/unist-util-find-all-after )
263+ — find all nodes after another node
264+ * [ ` unist-util-find-all-before ` ] ( https://github.com/syntax-tree/unist-util-find-all-before )
265+ — find all nodes before another node
266+ * [ ` unist-util-find-all-between ` ] ( https://github.com/mrzmmr/unist-util-find-all-between )
267+ — find all nodes between two nodes
268+ * [ ` unist-util-filter ` ] ( https://github.com/syntax-tree/unist-util-filter )
269+ — create a new tree with nodes that pass a check
270+ * [ ` unist-util-remove ` ] ( https://github.com/syntax-tree/unist-util-remove )
271+ — remove nodes from tree
272272
273273## Contribute
274274
0 commit comments