Skip to content

Instantly share code, notes, and snippets.

@umer4ik
Created November 26, 2019 13:55
Show Gist options
  • Save umer4ik/678882cbf113be911ad52df2fbc8b138 to your computer and use it in GitHub Desktop.
Save umer4ik/678882cbf113be911ad52df2fbc8b138 to your computer and use it in GitHub Desktop.
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