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

Function parts

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

Source from the content-addressed store, hash-verified

74}
75
76function parts(input: string) {
77 return input
78 .split("/")
79 .map((item) => trimGitSuffix(item.trim()))
80 .filter(Boolean)
81}
82
83function safeHost(input: string) {
84 return Boolean(input) && !input.startsWith("-") && !/[\s/\\]/.test(input)

Callers 1

parseRepositoryReferenceFunction · 0.70

Calls 1

trimGitSuffixFunction · 0.70

Tested by

no test coverage detected