MCPcopy Index your code
hub / github.com/cure53/DOMPurify / textHeavy

Function textHeavy

scripts/benchmark.js:115–126  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

113}
114
115function textHeavy(n) {
116 // Many text nodes, some carrying template expressions; pair with
117 // SAFE_FOR_TEMPLATES to exercise the scrub paths.
118 let html = '';
119 for (let i = 0; i < n; i++) {
120 html +=
121 `<p>Paragraph ${i} with plain prose and a mustache {{ user.name${i} }}` +
122 ` plus a template literal \${ totals[${i}] } and an erb <%= row${i} %> tail.</p>`;
123 }
124
125 return html;
126}
127
128function commentHeavy(n) {
129 // Comments with and without markup-significant payloads: exercises

Callers 1

benchmark.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…