MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / dockerPortsArray

Function dockerPortsArray

frontend/src/tools/common.ts:174–187  ·  view source on GitHub ↗
(ports: string[])

Source from the content-addressed store, hash-verified

172};
173
174export const dockerPortsArray = (ports: string[]) => {
175 const portArray = ports.map((iterator) => {
176 const pad = iterator.split("/");
177 const ports = pad[0];
178 const protocol = pad[1];
179 const { port1, port2 } = dockerPortsParse(ports.split(":"));
180 return {
181 host: port1,
182 container: port2,
183 protocol
184 };
185 });
186 return portArray;
187};
188
189export const isInt = (x: any) => {
190 if (x === null || x === "") {

Callers

nothing calls this directly

Calls 1

dockerPortsParseFunction · 0.85

Tested by

no test coverage detected