Skip to content

Commit

Permalink
Increased code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSpicyMeatball committed Jan 2, 2021
1 parent 0a7f7c1 commit 7a6a30f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.2.0] - 2021-01-02
- Integrated CI
- Added badges to README.md

## [1.1.1] - 2021-01-02
- Fixed bug with similar alias tags returning incorrect tag name

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<p>If you answered yes to any of those questions, then jsdoc-parse-plus is for you!</p>

<p><b>Version:</b> 1.1.1</p>
<p><b>Version:</b> 1.2.0</p>



Expand Down Expand Up @@ -616,10 +616,10 @@ README.md -- this file
└───index.js - 1.22 KB
└───/parse
└───index.d.ts - 392 Bytes
└───index.js - 1.8 KB
└───index.js - 1.44 KB
└───/parseTags
└───index.d.ts - 359 Bytes
└───index.js - 1.1 KB
└───index.js - 750 Bytes
└───/removeTags
└───index.d.ts - 306 Bytes
└───index.js - 1.58 KB
Expand All @@ -643,10 +643,10 @@ README.md -- this file
└───index.js - 272 Bytes
└───/parse
└───index.d.ts - 392 Bytes
└───index.js - 1.67 KB
└───index.js - 1.3 KB
└───/parseTags
└───index.d.ts - 359 Bytes
└───index.js - 986 Bytes
└───index.js - 607 Bytes
└───/removeTags
└───index.d.ts - 306 Bytes
└───index.js - 1.45 KB
Expand Down
4 changes: 4 additions & 0 deletions dist/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.2.0] - 2021-01-02
- Integrated CI
- Added badges to README.md

## [1.1.1] - 2021-01-02
- Fixed bug with similar alias tags returning incorrect tag name

Expand Down
10 changes: 5 additions & 5 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<p>If you answered yes to any of those questions, then jsdoc-parse-plus is for you!</p>

<p><b>Version:</b> 1.1.1</p>
<p><b>Version:</b> 1.2.0</p>



Expand Down Expand Up @@ -616,10 +616,10 @@ README.md -- this file
└───index.js - 1.22 KB
└───/parse
└───index.d.ts - 392 Bytes
└───index.js - 1.8 KB
└───index.js - 1.44 KB
└───/parseTags
└───index.d.ts - 359 Bytes
└───index.js - 1.1 KB
└───index.js - 750 Bytes
└───/removeTags
└───index.d.ts - 306 Bytes
└───index.js - 1.58 KB
Expand All @@ -643,10 +643,10 @@ README.md -- this file
└───index.js - 272 Bytes
└───/parse
└───index.d.ts - 392 Bytes
└───index.js - 1.67 KB
└───index.js - 1.3 KB
└───/parseTags
└───index.d.ts - 359 Bytes
└───index.js - 986 Bytes
└───index.js - 607 Bytes
└───/removeTags
└───index.d.ts - 306 Bytes
└───index.js - 1.45 KB
Expand Down
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsdoc-parse-plus",
"version": "1.1.1",
"version": "1.2.0",
"description": "Parse, add, remove, or modify standard jsdoc tags or custom tags from comments; Generate jsdoc comments from JavaScript data.",
"main": "lib/es5/index.js",
"module": "lib/es6/index.js",
Expand Down
5 changes: 2 additions & 3 deletions src/parse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ export const parse = (jsdoc: string, customTags: string[] = []) => {
const data = tag(item);

if (data && (!Array.isArray(data) || data.length > 0)) {
return {
...accumulator,
return Object.assign(accumulator, {
[item.replace('@', '')]: data,
};
});
}

return accumulator;
Expand Down
3 changes: 1 addition & 2 deletions src/parseTags/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { getTag } from '../getTag';
export const parseTags = (jsdoc: string, tags: string[]) => {
const tag = getTag(jsdoc);

return tags.reduce((accumulator, x) => ({
...accumulator,
return tags.reduce((accumulator, x) => Object.assign(accumulator, {
[x.replace('@', '')]: tag(x),
}), {});
};

0 comments on commit 7a6a30f

Please sign in to comment.