This commit is contained in:
Dan Ditomaso
2025-04-02 17:59:59 -04:00
parent 1a6e99971a
commit 8fffde0165
7 changed files with 421 additions and 528 deletions
+6 -4
View File
@@ -1,10 +1,12 @@
export function convertIntToIpAddress(int: number): string {
return `${int & 0xff}.${(int >> 8) & 0xff}.${(int >> 16) & 0xff}.${
(int >> 24) & 0xff
}`;
return `${int & 0xff}.${(int >> 8) & 0xff}.${(int >> 16) & 0xff}.${(int >> 24) & 0xff
}`;
}
export function convertIpAddressToInt(ip: string): number | null {
export function convertIpAddressToInt(ip: string): number | undefined {
if (!ip) {
return undefined;
}
return (
ip
.split(".")