MCPcopy Index your code
hub / github.com/prettier/prettier / formatAst

Function formatAst

src/main/core.js:384–388  ·  view source on GitHub ↗
(ast, options)

Source from the content-addressed store, hash-verified

382}
383
384async function formatAst(ast, options) {
385 options = await normalizeFormatOptions(options);
386 const doc = await printAstToDoc(ast, options);
387 return printDocToStringWithoutNormalizeOptions(doc, options);
388}
389
390// Doesn't handle shebang for now
391async function formatDoc(doc, options) {

Callers

nothing calls this directly

Calls 2

printAstToDocFunction · 0.90
normalizeFormatOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…