mirror of
https://github.com/meshtastic/web.git
synced 2026-05-04 12:44:44 -04:00
biome
This commit is contained in:
@@ -3,5 +3,12 @@ export function convertIntToIpAddress(int: number): string {
|
||||
}
|
||||
|
||||
export function convertIpAddressToInt(ip: string): number | null {
|
||||
return ip.split('.').reverse().reduce((ipnum, octet) => { return (ipnum<<8) + parseInt(octet)}, 0) >>> 0;
|
||||
return (
|
||||
ip
|
||||
.split(".")
|
||||
.reverse()
|
||||
.reduce((ipnum, octet) => {
|
||||
return (ipnum << 8) + Number.parseInt(octet);
|
||||
}, 0) >>> 0
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user