MCPcopy Create free account
hub / github.com/danvk/webdiff / htmlToText

Function htmlToText

ts/codediff/__tests__/addcharacterdiffs_test.ts:18–23  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

16}
17
18function htmlToText(html: string) {
19 const div = document.createElement('div');
20 div.innerHTML = html;
21 // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
22 return div.textContent ?? '';
23}
24
25describe('utility code', () => {
26 test('simplifyCodes', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected