MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / shellQuote

Function shellQuote

scripts/integration/cli.mjs:2197–2206  ·  view source on GitHub ↗
(parts)

Source from the content-addressed store, hash-verified

2195}
2196
2197function shellQuote(parts) {
2198 return parts
2199 .map((part) => {
2200 const value = String(part);
2201 return /^[A-Za-z0-9_./:=@+-]+$/.test(value)
2202 ? value
2203 : `'${value.replaceAll("'", "'\\''")}'`;
2204 })
2205 .join(" ");
2206}
2207
2208function cleanup() {
2209 if (serverProcess && !serverProcess.killed) {

Callers 1

logCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected