MCPcopy Create free account
hub / github.com/ampproject/amphtml / cleanWhitespace

Function cleanWhitespace

testing/helpers/cleanHtml.ts:18–20  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

16}
17
18export function cleanWhitespace(html: string): string {
19 return html.trim().replace(/\s\s+/g, ' ');
20}

Callers 1

cleanHtmlFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected