MCPcopy
hub / github.com/prettier/prettier / cleanDoc

Function cleanDoc

src/document/utilities/index.js:354–356  ·  view source on GitHub ↗
(doc)

Source from the content-addressed store, hash-verified

352// - merge arrays of strings into single strings
353// - remove nested `group`s and empty `fill`/`align`/`indent`/`line-suffix`/`if-break` if possible
354function cleanDoc(doc) {
355 return mapDoc(doc, (currentDoc) => cleanDocFn(currentDoc));
356}
357
358/**
359@param {Doc} doc

Callers 7

replacePlaceholdersFunction · 0.90
is-empty-doc.jsFile · 0.90
stripTrailingHardlineFunction · 0.85
replacePlaceholdersFunction · 0.85

Calls 2

mapDocFunction · 0.85
cleanDocFnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…