Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Commit 134dace

Browse files
committed
Simplified code.
1 parent 5b05ec4 commit 134dace

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

index.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,8 @@ const parser = (content, filename) =>
2727
'description': curr.description.full,
2828
'params': curr.tags.filter(tag =>
2929
tag.type === 'param' && !tag.name.match(/\./))
30-
.reduce((prev, curr) => {
31-
32-
if (prev) {
33-
34-
return `${prev}, ${formatStringForParam(curr.name)}`;
35-
36-
}
37-
38-
return formatStringForParam(curr.name);
39-
40-
}, ''),
30+
.map(tag => formatStringForParam(tag.name))
31+
.join(', '),
4132
'tags': {
4233
'example': curr.tags.filter(tag => tag.type === 'example')
4334
.map(tag => tag.string),

0 commit comments

Comments
 (0)