Skip to content

Commit a6eeaea

Browse files
committed
Refactor code-style
1 parent 565f530 commit a6eeaea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/**
77
* Stringify one nlcst node or list of nodes.
88
*
9-
* @param {Root|Content|Content[]} node
9+
* @param {Root|Content|Array<Content>} node
1010
* @param {string} [separator='']
1111
* @returns {string}
1212
*/
@@ -20,7 +20,7 @@ export function toString(node, separator = '') {
2020
// @ts-expect-error Looks like a literal.
2121
if (typeof node.value === 'string') return node.value
2222

23-
/** @type {Array.<Content|Root>} */
23+
/** @type {Array<Content|Root>} */
2424
// @ts-expect-error Looks like a list of nodes or parent.
2525
const children = (Array.isArray(node) ? node : node.children) || []
2626

@@ -29,7 +29,7 @@ export function toString(node, separator = '') {
2929
return children[0].value
3030
}
3131

32-
/** @type {Array.<string>} */
32+
/** @type {Array<string>} */
3333
const values = []
3434

3535
while (++index < children.length) {

Diff for: readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Stringify the given [nlcst][] node (or list of nodes).
4949

5050
###### Parameters
5151

52-
* `node` ([`Node`][node] or `Array.<Node>`)
52+
* `node` ([`Node`][node] or `Array<Node>`)
5353
* `separator` (`string`, default: `''`) — Value to delimit each item
5454

5555
###### Returns

0 commit comments

Comments
 (0)