import setCookie from './setCookie';

/**
 * 移除Cookie数据
 * @param {string} key
 * @param {string} domain
 *
 * removeCookie('cookieId');
 * // 移除bilibili.com域下的cookie
 * removeCookie('cookieId', '.bilibili.com');
 */
function removeCookie(key, domain) {
  setCookie(key, '', {
    exDays: -1,
    domain: domain
  });
}

export default removeCookie;
