MCPcopy Create free account
hub / github.com/TabularisDB/tabularis / getProtocolFromExample

Function getProtocolFromExample

src/utils/connectionStringParser.ts:67–76  ·  view source on GitHub ↗
(example?: string | null)

Source from the content-addressed store, hash-verified

65}
66
67function getProtocolFromExample(example?: string | null): string | null {
68 if (!example?.trim()) return null;
69
70 try {
71 const url = new URL(example.trim());
72 return normalizeProtocol(url.protocol);
73 } catch {
74 return null;
75 }
76}
77
78function connectionStringImportEnabled(
79 capabilities?: DriverCapabilities | null,

Callers 1

buildProtocolRegistryFunction · 0.85

Calls 1

normalizeProtocolFunction · 0.85

Tested by

no test coverage detected