docs: function set(key, value, options) {
      options = typeof options ==='object' ? options : { expires: options };
  
      let expires = options.expires != null ? options.expires : defaults.expires;
  
      if (typeof expires === 'string' && expires !== '') {
          expires = new Date(expires);
      } else if (typeof expires === 'number') {
          expires = new Date(+new Date + (1000 * day * expires));
      }
  
      if (expires && 'toGMTString' in expires) {
          expires = ';expires=' + expires.toGMTString();
      }
  
      let path = ';path=' + (options.path || defaults.path);
  
      let domain = options.domain || defaults.domain;
      domain = domain ? ';domain=' + domain : '';
  
      let secure = options.secure || defaults.secure ? ';secure' : '';
  
      if (typeof value == 'object') {
          if (Array.isArray(value) || isPlainObject(value)) {
              value = JSON.stringify(value);
          } else {
              value = '';
          }
      }
  
      document.cookie = encodeCookie(key) + '=' + encodeCookie(value) + expires + path + domain + secure;
  }