let ProcessText = module.exports = {} ProcessText.removeHtml = (string) => { return string .replace(/&[#A-Za-z0-9]+;/g,' ') //Rip out all HTML entities .replace(/<[^>]+>/g, ' ') //Rip out all HTML tags .replace(/\s+/g, ' ') //Remove all whitespace }