Skip to content

Commit b03ce26

Browse files
committed
Refactor code-style
1 parent a622cd3 commit b03ce26

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

index.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
* @typedef {import('mdast').Root|import('mdast').Content} Node
33
*
44
* @typedef Options
5+
* Configuration (optional).
56
* @property {boolean} [includeImageAlt=true]
7+
* Whether to use `alt` for `image`s.
68
*/
79

810
/**
9-
* Get the text content of a node.
10-
* Prefer the node’s plain-text fields, otherwise serialize its children,
11+
* Get the text content of a node or list of nodes.
12+
* Prefers the node’s plain-text fields, otherwise serializes its children,
1113
* and if the given value is an array, serialize the nodes in it.
1214
*
1315
* @param {unknown} value
@@ -36,12 +38,12 @@ function one(value, includeImageAlt) {
3638
}
3739

3840
/**
39-
* @param {Array.<unknown>} values
41+
* @param {Array<unknown>} values
4042
* @param {boolean} includeImageAlt
4143
* @returns {string}
4244
*/
4345
function all(values, includeImageAlt) {
44-
/** @type {Array.<string>} */
46+
/** @type {Array<string>} */
4547
const result = []
4648
let index = -1
4749

0 commit comments

Comments
 (0)