Skip to content

Commit 9c48f79

Browse files
committed
Add improved jsdoc
1 parent 200f653 commit 9c48f79

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

example.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

index.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@
99

1010
import {convert} from 'unist-util-is'
1111

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+
* Children of `parent` that pass `test`.
24+
*/
1225
export const findAllBefore =
1326
/**
1427
* @type {(
@@ -18,11 +31,9 @@ export const findAllBefore =
1831
*/
1932
(
2033
/**
21-
* Utility to get all children of a parent after a node or index
22-
*
23-
* @param {Parent} parent Parent node
24-
* @param {Node|number} index Child of `parent`, or it’s index
25-
* @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]
2637
* @returns {Array<Node>}
2738
*/
2839
function (parent, index, test) {

0 commit comments

Comments
 (0)