MCPcopy Create free account
hub / github.com/anomalyco/opencode / unquote

Function unquote

packages/opencode/src/tool/shell.ts:127–133  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

125}
126
127function unquote(text: string) {
128 if (text.length < 2) return text
129 const first = text[0]
130 const last = text[text.length - 1]
131 if ((first === '"' || first === "'") && first === last) return text.slice(1, -1)
132 return text
133}
134
135function home(text: string) {
136 if (text === "~") return os.homedir()

Callers 2

expandFunction · 0.70
shell.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected