UNPKG

@cloud-copilot/iam-simulate

Version:
24 lines 875 B
/** * Determines if a given IP address is within a specified CIDR block. * * @param ip - The IP address to check (e.g., '192.168.1.10'). * @param cidr - The CIDR block (e.g., '192.168.1.0/24'). * @returns True if the IP address is within the CIDR block; otherwise, false. * @throws Error if either the IP address or CIDR block is invalid. */ export declare function isIpInCidrV4(ip: string, cidr: string): boolean; /** * Validates an IPv4 address. * * @param ip - The IP address to validate. * @returns True if the IP address is valid; otherwise, false. */ export declare function isValidIpV4(ip: string): boolean; /** * Validates an IPv4 CIDR block. * * @param cidr - The CIDR block to validate. * @returns True if the CIDR block is valid; otherwise, false. */ export declare function isValidCidrV4(cidr: string): boolean; //# sourceMappingURL=ipv4.d.ts.map