File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 9
9
10
10
import { convert } from 'unist-util-is'
11
11
12
+ /**
13
+ * Find the first node in `parent` before another `node` or before an index,
14
+ * that passes `test`.
15
+
16
+ * @param parent
17
+ * Parent node.
18
+ * @param index
19
+ * Child of `parent`, or it’s index.
20
+ * @param [test]
21
+ * `unist-util-is`-compatible test.
22
+ * @returns
23
+ *
24
+ */
12
25
export const findBefore =
13
26
/**
14
27
* @type {(
@@ -18,9 +31,9 @@ export const findBefore =
18
31
*/
19
32
(
20
33
/**
21
- * @param {Parent } parent Parent node
22
- * @param {Node|number } index Child of `parent`, or it’s index
23
- * @param {null|undefined|Type|Props|TestFunctionAnything|Array<Type|Props|TestFunctionAnything> } [test] is-compatible test (such as a type)
34
+ * @param {Parent } parent
35
+ * @param {Node|number } index
36
+ * @param {null|undefined|Type|Props|TestFunctionAnything|Array<Type|Props|TestFunctionAnything> } [test]
24
37
* @returns {Node|null }
25
38
*/
26
39
function ( parent , index , test ) {
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ There is no default export.
92
92
93
93
### ` findBefore(parent, node|index[, test]) `
94
94
95
- Find the first node in ` parent ` ([ ` Parent ` ] [ parent ] ) before another node
95
+ Find the first node in ` parent ` ([ ` Parent ` ] [ parent ] ) before another ` node `
96
96
([ ` Node ` ] [ node ] ) or before an index, that passes ` test ` (` Test ` from
97
97
[ ` unist-util-is ` ] [ test ] ).
98
98
You can’t perform that action at this time.
0 commit comments