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

Function isInt

frontend/src/tools/common.ts:189–200  ·  view source on GitHub ↗
(x: any)

Source from the content-addressed store, hash-verified

187};
188
189export const isInt = (x: any) => {
190 if (x === null || x === "") {
191 return false;
192 }
193 for (let i = 0; i < x.length; i++) {
194 const char = x[i];
195 if (char < "0" || char > "9") {
196 return false;
197 }
198 }
199 return true;
200};
201
202export const padZero = (num: string) => (num === "0" ? num : num.padStart(2, "0"));
203

Callers 1

dockerPortsParseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected