Created
November 26, 2019 13:55
-
-
Save umer4ik/678882cbf113be911ad52df2fbc8b138 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function strip(html){ | |
var doc = new DOMParser().parseFromString(html, 'text/html'); | |
return doc.body.textContent || ""; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment