(item: Formatter.Info)
| 41 | const formatters: Record<string, Formatter.Info> = {} |
| 42 | |
| 43 | async function getCommand(item: Formatter.Info) { |
| 44 | let cmd = commands[item.name] |
| 45 | if (cmd === false || cmd === undefined) { |
| 46 | cmd = await item.enabled({ ...ctx, experimentalOxfmt: flags.experimentalOxfmt }) |
| 47 | commands[item.name] = cmd |
| 48 | } |
| 49 | return cmd |
| 50 | } |
| 51 | |
| 52 | async function isEnabled(item: Formatter.Info) { |
| 53 | const cmd = await getCommand(item) |
no test coverage detected