MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / schemeOf

Function schemeOf

packages/agent-core/src/utils/proxy.ts:36–38  ·  view source on GitHub ↗

Lowercase URL scheme (without the trailing colon), or undefined if absent.

(value: string)

Source from the content-addressed store, hash-verified

34
35/** Lowercase URL scheme (without the trailing colon), or undefined if absent. */
36function schemeOf(value: string): string | undefined {
37 return /^([a-z][a-z0-9+.-]*):/i.exec(value)?.[1]?.toLowerCase();
38}
39
40/** First non-blank value among `keys` (both casings are passed in by callers). */
41function firstNonBlank(env: Env, keys: readonly string[]): string | undefined {

Callers 2

httpSchemeValueFunction · 0.85
resolveSocksProxyFunction · 0.85

Calls 1

execMethod · 0.65

Tested by

no test coverage detected