MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / getFormattedCode

Function getFormattedCode

static/api/api.ts:56–63  ·  view source on GitHub ↗
(options: FormattingRequest)

Source from the content-addressed store, hash-verified

54
55/** POST /api/format/:formatter */
56export const getFormattedCode = async (options: FormattingRequest) =>
57 await request<FormattingResponse>(`/format/${options.formatterId}`, {
58 method: 'POST',
59 headers: {
60 'Content-Type': 'application/json',
61 },
62 body: JSON.stringify(_.pick(options, 'source', 'base', 'tabWidth', 'useSpaces')),
63 });

Callers 1

doFormatRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected