MCPcopy Create free account
hub / github.com/cloudflare/computer / sh

Function sh

packages/computer/src/sh.ts:95–102  ·  view source on GitHub ↗
(strings: TemplateStringsArray, ...values: ShellValue[])

Source from the content-addressed store, hash-verified

93// and all — and only `${...}` substitutions are escaped. See the file
94// header for the interpolation rules.
95export function sh(strings: TemplateStringsArray, ...values: ShellValue[]): string {
96 const parts = strings.raw;
97 let out = parts[0];
98 for (let i = 0; i < values.length; i++) {
99 out += interpolate(values[i]) + parts[i + 1];
100 }
101 return out;
102}

Callers 3

handleCreateFunction · 0.90
execFunction · 0.85
sh.test.tsFile · 0.85

Calls 1

interpolateFunction · 0.85

Tested by

no test coverage detected