Skip to content

Commit

Permalink
Removed promise.resolve wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Luu authored and Thomas Luu committed Nov 13, 2019
1 parent 06c7742 commit cba65c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/summarize.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ const { SummarizerManager } = require('node-summarizer');

module.exports = async function (text, numSentences = 3) {
const summarizer = new SummarizerManager(text, numSentences);
return summarizer.getSummaryByRank().then(
(summaryObject) => Promise.resolve(summaryObject.summary),
);
return summarizer.getSummaryByRank().then((summaryObject) => summaryObject.summary);
};

0 comments on commit cba65c5

Please sign in to comment.