'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var setCookie = _interopDefault(require('./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
  });
}

module.exports = removeCookie;
