Public
Script
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
import { DOMParser } from "https://deno.land/x/deno_dom/deno-dom-wasm.ts";
export function stripHTML(html: string) {
const doc = new DOMParser().parseFromString(html, "text/html");
return doc.body.textContent;
}
July 22, 2024