MCPcopy Create free account
hub / github.com/cutedCha/noteBoook / extractTextContent

Function extractTextContent

tests/pagination.property.test.js:67–71  ·  view source on GitHub ↗

* Helper function to extract text content from HTML * @param {string} html - HTML string * @returns {string} Plain text content

(html)

Source from the content-addressed store, hash-verified

65 * @returns {string} Plain text content
66 */
67 function extractTextContent(html) {
68 const div = document.createElement('div');
69 div.innerHTML = html;
70 return div.textContent || div.innerText || '';
71 }
72
73 /**
74 * Helper function to normalize whitespace for comparison

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected