@@ -15,7 +15,7 @@ var splice = [].splice;
1515/**
1616 * Transform a string into an applicable expression.
1717 *
18- * @param {string } value
18+ * @param {string } value - Value to transform.
1919 * @return {RegExp }
2020 */
2121function toExpression ( value ) {
@@ -25,14 +25,14 @@ function toExpression(value) {
2525/**
2626 * Wrap an expression into an assertion function.
2727 *
28- * @param {RegExp } expression
28+ * @param {RegExp } expression - Expression to test.
2929 * @return {Function }
3030 */
3131function wrapExpression ( expression ) {
3232 /**
3333 * Assert `value` matches the bound `expression`.
3434 *
35- * @param {string } value
35+ * @param {string } value - Value to check.
3636 * @return {boolean }
3737 */
3838 function assertion ( value ) {
@@ -45,7 +45,7 @@ function wrapExpression(expression) {
4545/**
4646 * Check if `node` is a heading.
4747 *
48- * @param {Node } node
48+ * @param {Node } node - Node to check.
4949 * @return {boolean }
5050 */
5151function isHeading ( node ) {
@@ -55,9 +55,9 @@ function isHeading(node) {
5555/**
5656 * Check if `node` is the main heading.
5757 *
58- * @param {Node } node
59- * @param {number? } depth
60- * @param {function(string): boolean } test
58+ * @param {Node } node - Node to check.
59+ * @param {number? } depth - Depth to search for.
60+ * @param {function(string): boolean } test - Tester.
6161 *
6262 * @return {boolean }
6363 */
@@ -68,8 +68,8 @@ function isOpeningHeading(node, depth, test) {
6868/**
6969 * Check if `node` is the next heading.
7070 *
71- * @param {Node } node
72- * @param {number? } depth
71+ * @param {Node } node - Node to check.
72+ * @param {number? } depth - Depth of the opening heading.
7373 * @return {boolean }
7474 */
7575function isClosingHeading ( node , depth ) {
@@ -79,9 +79,10 @@ function isClosingHeading(node, depth) {
7979/**
8080 * Search a node for heading range.
8181 *
82- * @param {Node } root
83- * @param {Function } test
84- * @param {Function } callback
82+ * @param {Node } root - Node to search.
83+ * @param {Function } test - Assertion.
84+ * @param {Function } callback - Callback invoked when
85+ * found.
8586 */
8687function search ( root , test , callback ) {
8788 var index = - 1 ;
@@ -132,8 +133,10 @@ function search(root, test, callback) {
132133/**
133134 * Wrapper.
134135 *
135- * @param {string|RegExp|Function } heading
136- * @param {Function } callback
136+ * @param {string|RegExp|Function } heading - Heading to
137+ * search for.
138+ * @param {Function } callback - Callback invoked when
139+ * found.
137140 * @return {function(node) }
138141 */
139142function wrapper ( heading , callback ) {
@@ -152,7 +155,7 @@ function wrapper(heading, callback) {
152155 * `test`, up until the following closing with
153156 * equal or higher depth.
154157 *
155- * @param {Node } node
158+ * @param {Node } node - Node to search in.
156159 */
157160 function transformer ( node ) {
158161 search ( node , test , callback ) ;
0 commit comments