MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / quoteArg

Function quoteArg

src/cm/lsp/installRuntime.ts:14–19  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

12}
13
14export function quoteArg(value: unknown): string {
15 const str = String(value ?? "");
16 if (!str.length) return "''";
17 if (/^[A-Za-z0-9_@%+=:,./-]+$/.test(str)) return str;
18 return `'${str.replace(/'/g, "'\\''")}'`;
19}
20
21export function formatCommand(
22 command: string | string[] | null | undefined,

Callers 11

joinCommandFunction · 0.90
buildUninstallCommandFunction · 0.90
buildInstallCommandFunction · 0.90
buildDerivedCheckCommandFunction · 0.90
buildAxsBridgeCommandFunction · 0.90
readLuauRuntimeFailureFunction · 0.90
checkInstallationFunction · 0.90
installServerFunction · 0.90
buildDefaultCheckCommandFunction · 0.90
formatCommandFunction · 0.85
wrapShellCommandFunction · 0.85

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected