MCPcopy Create free account
hub / github.com/microsoft/vscode-cpptools / getHostsFromHostConfig

Function getHostsFromHostConfig

Extension/src/SSH/sshHosts.ts:251–255  ·  view source on GitHub ↗
(hostValue: string | string[])

Source from the content-addressed store, hash-verified

249}
250
251function getHostsFromHostConfig(hostValue: string | string[]): string[] {
252 const hosts: string[] = Array.isArray(hostValue) ? hostValue : [hostValue];
253
254 return hosts.filter(h => !containsWildcard(h) && !h.match(/^\s*$/) && !h.match(/^!/));
255}
256
257function containsWildcard(str: string): boolean {
258 return !!str.match(/[?*]/);

Callers 1

extractHostsFunction · 0.85

Calls 2

containsWildcardFunction · 0.85
filterMethod · 0.45

Tested by

no test coverage detected