Public
Script
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;
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
July 22, 2024