ip-navigator
Version:
A tool for IP address manipulation and calculation
46 lines (45 loc) • 2.21 kB
TypeScript
import * as validation from "./validation/index.js";
import * as conversion from "./conversion/index.js";
import * as subnet from "./subnet/index.js";
import * as operation from "./operation/index.js";
export { validation, conversion, subnet, operation };
export * from "./validation/index.js";
export * from "./conversion/index.js";
export * from "./subnet/index.js";
export * from "./operation/index.js";
declare const ipNavigator: {
getNextIPAddress: (ipAddress: string) => string;
getPreviousIPAddress: (ipAddress: string) => string;
isIPAddressInSubnet: (ipAddress: string, networkAddress: string, subnetMask: string) => boolean;
isPublicIP: (ipAddress: string) => boolean;
isPrivateIP: (ipAddress: string) => boolean;
getIPRange: (startIP: string, endIP: string) => string[];
compareIPAddresses: (ip1: string, ip2: string) => -1 | 0 | 1;
calculateNetworkAddress: (ipAddress: string, subnetMask: string) => string;
calculateBroadcastAddress: (ipAddress: string, subnetMask: string) => string;
calculateAvailableIPs: (networkAddress: string, subnetMask: string) => string[];
getSubnetInfo: (ipAddress: string, subnetMask: string) => {
networkAddress: string;
broadcastAddress: string;
totalHosts: number;
usableHosts: number;
firstUsableHost: string;
lastUsableHost: string;
};
convertDecimalOctetToBinary: (decimalOctet: string) => string;
convertBinaryOctetToDecimal: (binaryOctet: string) => string;
ipToBinary: (ipAddress: string) => string;
binaryToIP: (binaryIP: string) => string;
ipToInteger: (ipAddress: string) => number;
integerToIP: (integer: number) => string;
cidrToSubnetMask: (prefix: number) => string;
subnetMaskToCIDR: (subnetMask: string) => number;
isValidDecimalOctet: (decimalOctet: string) => boolean;
isValidBinaryOctet: (binaryOctet: string) => boolean;
isValidPrefix: (prefix: string) => boolean;
isValidIPAddress: (ipAddress: string) => boolean;
isValidSubnetMask: (subnetMask: string) => boolean;
isValidCIDR: (cidr: string) => boolean;
isValidBinaryIP: (binaryIP: string) => boolean;
};
export default ipNavigator;