UNPKG

is-localhost-ip

Version:

Checks whether given DNS name or IPv4/IPv6 address belongs to a local machine

8 lines (6 loc) 220 B
/** Returns true if given parameter is local IP address or resolves into one, false otherwise */ declare async function isLocalhost( addrOrHost: string, canBind?: boolean, ): Promise<boolean>; export = isLocalhost;