From 7a6a30fefa6e03879871238336df024334517e1a Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 2 Jan 2021 12:37:59 -0700 Subject: [PATCH] Increased code coverage --- CHANGELOG.md | 4 ++++ README.md | 10 +++++----- dist/CHANGELOG.md | 4 ++++ dist/README.md | 10 +++++----- dist/package.json | 2 +- src/parse/index.ts | 5 ++--- src/parseTags/index.ts | 3 +-- 7 files changed, 22 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84f7c84..a1f54bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index f51a15a..fe5d02e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@

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

-

Version: 1.1.1

+

Version: 1.2.0

@@ -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 @@ -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 diff --git a/dist/CHANGELOG.md b/dist/CHANGELOG.md index 84f7c84..a1f54bd 100644 --- a/dist/CHANGELOG.md +++ b/dist/CHANGELOG.md @@ -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 diff --git a/dist/README.md b/dist/README.md index f51a15a..fe5d02e 100644 --- a/dist/README.md +++ b/dist/README.md @@ -15,7 +15,7 @@

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

-

Version: 1.1.1

+

Version: 1.2.0

@@ -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 @@ -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 diff --git a/dist/package.json b/dist/package.json index e6e6dd2..ef37b43 100644 --- a/dist/package.json +++ b/dist/package.json @@ -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", diff --git a/src/parse/index.ts b/src/parse/index.ts index 14e6fe6..264ce4f 100644 --- a/src/parse/index.ts +++ b/src/parse/index.ts @@ -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; diff --git a/src/parseTags/index.ts b/src/parseTags/index.ts index 0fe3304..d812431 100644 --- a/src/parseTags/index.ts +++ b/src/parseTags/index.ts @@ -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), }), {}); }; \ No newline at end of file