MCPcopy Create free account
hub / github.com/bxcodec/github-readme-medium-recent-article / stripHTML

Function stripHTML

app/util/medium.ts:54–59  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

52
53
54function stripHTML(text: string) {
55 const dom = new JSDOM(text);
56 const textContent = dom.window.document.body.textContent || '';
57 const cleanText = textContent.trim();
58 return cleanText;
59}
60
61
62// Define a type for the image data

Callers 1

getArticleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected