docs: function Cookie(
    name,
    value,
    pathOrDomain,
    dateOrPath,
    date,
    isSecure
    ) {
    var _name = '';
    var _value = '';
    var _domain = null;
    var _path = '/';
    var _date = null;
    var _expiry = null;
    var _isSecure = false;
  
    var cookie;
    var numOfArgs = arguments.length > 6 ? 6 : arguments.length;
  
    if (assert(name).extends(Instance).isValid) {
      cookie = name._instance;
      _name = cookie.getNameSync();
      _value = cookie.getValueSync();
      _domain = cookie.getDomainSync();
      _path = cookie.getPathSync();
      _expiry = cookie.getExpirySync() ?
        new Date(cookie.getExpirySync().getTimeSync()) :
        null;
      _isSecure = cookie.isSecureSync();
    } else {
      validateArgIsString(name, 'name');
      validateArgIsString(value, 'value');
      _name = name;
      _value = value;
      switch (numOfArgs) {
        case 2:
          cookie = new Class(_name, _value);
          break;
        case 3:
          validateArgIsString(pathOrDomain, 'path');
          _path = pathOrDomain;
          cookie = new Class(_name, _value, _path);
          break;
        case 4:
          validateArgIsString(pathOrDomain, 'path');
          _path = pathOrDomain;
          if (dateOrPath instanceof Date) {
            dateOrPath = roundDateToSeconds(dateOrPath);
            _date = createDate(dateOrPath);
            _expiry = dateOrPath;
          }
          cookie = new Class(_name, _value, _path, _date);
          break;
        case 5:
          validateArgIsString(pathOrDomain, 'domain');
          validateArgIsString(dateOrPath, 'path');
          _domain = pathOrDomain;
          _path = dateOrPath;
          if (date instanceof Date) {
            date = roundDateToSeconds(date);
            _date = createDate(date);
            _expiry = date;
          }
          cookie = new Class(_name, _value, _domain, _path, _date);
          break;
        case 6:
          validateArgIsString(pathOrDomain, 'domain');
          validateArgIsString(dateOrPath, 'path');
          validateArgIsBoolean(isSecure, 'isSecure');
          _domain = pathOrDomain;
          _path = dateOrPath;
          if (date instanceof Date) {
            date = roundDateToSeconds(date);
            _date = createDate(date);
            _expiry = date;
          }
          _isSecure = isSecure;
          cookie = new Class(
            _name,
            _value,
            _domain,
            _path,
            _date ? _date : null,
            _isSecure
            );
          break;
        default:
          throw new Error('cookies require a name and a value at minimum.');
      }
    }
  
    addFinalProp(this, '_instance', cookie);
    addFinalProp(this, '_name', _name);
    addFinalProp(this, '_value', _value);
    addFinalProp(this, '_domain', _domain);
    addFinalProp(this, '_path', _path);
    addFinalProp(this, '_expiry', _expiry);
    addFinalProp(this, '_isSecure', _isSecure);
  }