MCPcopy
hub / github.com/ineo6/hosts / buildHosts

Function buildHosts

src/utils.ts:8–18  ·  view source on GitHub ↗
(hostData: HostData[])

Source from the content-addressed store, hash-verified

6}
7
8export function buildHosts(hostData: HostData[]) {
9 let generatedContent = ''
10
11 hostData.forEach(host => {
12 if (host.ip?.length) {
13 generatedContent += lJust(host.ip[0].host, 30) + host.name + '\n';
14 }
15 })
16
17 return generatedContent
18}

Callers 2

saveHostsFunction · 0.90
getHostsFunction · 0.90

Calls 1

lJustFunction · 0.85

Tested by

no test coverage detected