MCPcopy
hub / github.com/prettier/prettier / inheritLabel

Function inheritLabel

src/document/utilities/index.js:381–385  ·  view source on GitHub ↗
(doc, fn)

Source from the content-addressed store, hash-verified

379}
380
381function inheritLabel(doc, fn) {
382 return doc.type === DOC_TYPE_LABEL
383 ? { ...doc, contents: fn(doc.contents) }
384 : fn(doc);
385}
386
387/**
388returns true iff cleanDoc(doc) === ""

Callers 3

callPluginPrintFunctionFunction · 0.90
printCommentsFunction · 0.90
printFunction · 0.90

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…