Skip to content

Commit

Permalink
docs(jsdoc): add comments for generateTextEmailFromHTML
Browse files Browse the repository at this point in the history
Add JSDoc comments for genearteTextEmailFromHTML utility

Resolves #61

Signed-off-by: Niloy Sikdar <[email protected]>
  • Loading branch information
niloysikdar committed Aug 12, 2022
1 parent 709a2eb commit 2491ebf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import htmlToPlainText from 'textversionjs';

/**
* Function to convert HTML Email to Text version.
* @param {string} html - HTML which needs to be converted.
* @returns {string} Text version of the email in string format.
*/

export const generateTextEmailFromHTML = (html: string): string => {
const plainText = htmlToPlainText(html, { headingStyle: 'hashify' });
return plainText;
Expand Down

0 comments on commit 2491ebf

Please sign in to comment.