code: function setItem(key, value) {
    var persistency = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  
    if (!persistency) {
      session.setItem(key, value);
      return;
    }
  
    if (!hasLocalStorage()) {
      cookie$1.setItem(key, value);
      return;
    }
  
    try {
      localstorage.setItem(key, value);
    } catch (e) {
      var code = e.code;
  
  
      if (code === 22 || code === 1014) {
        log('Quota exceeded for "' + key + '"!', 'error', debug);
  
        // Let's try with cookies then!
        cookie$1.setItem(key, value);
      }
    }
  }
docs: Set the item.
  Here data will be saved...in a way or another:
  1) localStorage
  2) cookies
  3) plain object
  
  An extra check is done here for the QuotaExceededError.
  I'll try to save data and just silently warning it
  in the console, so also real-time error tracking tools won't stress too much.
  @param {String}  key
  @param {String}  value
  @param {Boolean} [persistency=true]