This commit is contained in:
Dan Ditomaso
2025-03-28 11:45:48 -04:00
parent a378cce0be
commit c55fdbd982
7 changed files with 103 additions and 69 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(".")