/**
 * This definition of "anonymization" matches that used by the Event API in its
 * "anonymize_ip" setting.
 * Source: https://github.com/optimizely/optimizely-flume/blob/560389d7d1d366d3d0894662680b0cb928e673d4/src/main/java/com/optimizely/flume/interceptor/IPAnonymizingInterceptor.java#L69-L83
 *
 * @param {String} ip
 *        A valid v4 or v6 address.
 * @returns {String}
 *        A version of the given address, with low bits zeroed out.
 *        Lower 8 bits in the case of IPv4; 80 bits in case of IPv6.
 */
export function anonymize(ip: string): string;
