MCPcopy Index your code
hub / github.com/anomalyco/opencode / route

Function route

packages/opencode/test/server/httpapi-exercise/dsl.ts:197–202  ·  view source on GitHub ↗
(template: string, params: Record<string, string>)

Source from the content-addressed store, hash-verified

195})
196
197export function route(template: string, params: Record<string, string>) {
198 return Object.entries(params).reduce(
199 (next, [key, value]) => next.replaceAll(`{${key}}`, value).replaceAll(`:${key}`, value),
200 template,
201 )
202}
203
204export function controlledPtyInput(title: string | undefined) {
205 return {

Callers 1

index.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected