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

Function safeSegment

packages/opencode/src/util/repository.ts:87–89  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

85}
86
87function safeSegment(input: string) {
88 return input !== "." && input !== ".." && !input.includes(":") && !/[\s/\\]/.test(input)
89}
90
91function hostLike(input: string) {
92 return input.includes(".") || input.includes(":") || input === "localhost"

Callers 1

buildRemoteReferenceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected