import { IPTools } from "https://deno.land/x/ip2location@8.3.0/src/ip2location.d.ts";
Methods
baseConvert(): any
num: number,
fromBase: number,
toBase: number,
A function to convert a number between arbitrary bases.
binaryToIP(myBin: string): string
Converts binary string representation into IPv6.
cidrToIPV4(cidr: string): string[]
Returns the starting and ending IPv4 addresses for the CIDR.
cidrToIPV6(cidr: string): string[]
Returns the starting and ending IPv6 addresses for the CIDR.
compressIPV6(myIP: string): string
Returns the compressed form of the IPv6 address.
decimalToIPV4(ipNum: number): string
Converts an IP number to IPv4 address.
decimalToIPV6(ipNum: string): string
Converts an IP number to IPv6 address.
expandIPV6(myIP: string): string
Returns the expanded form of the IPv6 address.
ipToBinary(myIP: string): string
Converts IPv6 into binary string representation.
ipV4ToCIDR(ipFrom: string, ipTo: string): string[]
Returns an array of the CIDR addresses.
ipV4ToDecimal(myIP: string): number
Converts an IPv4 address to IP number.
ipV6ToCIDR(ipFrom: string, ipTo: string): string[]
Returns an array of the CIDR addresses.
ipV6ToDecimal(myIP: string): any
Converts an IPv6 address to IP number.
isIPV4(myIP: string): boolean
Whether the IP address is an IPv4.
isIPV6(myIP: string): boolean
Whether the IP address is an IPv6.