MCPcopy Create free account
hub / github.com/arctic-cli/interface / getFormatter

Function getFormatter

packages/arctic/src/format/index.ts:76–87  ·  view source on GitHub ↗
(ext: string)

Source from the content-addressed store, hash-verified

74 }
75
76 async function getFormatter(ext: string) {
77 const formatters = await state().then((x) => x.formatters)
78 const result = []
79 for (const item of Object.values(formatters)) {
80 log.info("checking", { name: item.name, ext })
81 if (!item.extensions.includes(ext)) continue
82 if (!(await isEnabled(item))) continue
83 log.info("enabled", { name: item.name, ext })
84 result.push(item)
85 }
86 return result
87 }
88
89 export async function status() {
90 const s = await state()

Callers 1

initFunction · 0.85

Calls 3

stateFunction · 0.85
pushMethod · 0.80
isEnabledFunction · 0.70

Tested by

no test coverage detected