dist/storage-helper.js
function setItem(key, value) {
  var expires = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;

  if (!isCookieEnabled) {
    session.setItem(key, value);
    log('I\'ve saved "' + key + '" in a plain object :)', 'warning', debug);
    return;
  }

  cookie.set(key, value, { expires: expires });
  log('I\'ve saved "' + key + '" in a cookie :)', 'warning', debug);
}
function setItem(key, value) {
  var expires = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;

  if (!isCookieEnabled) {
    session.setItem(key, value);
    log('I\'ve saved "' + key + '" in a plain object :)', 'warning', debug);
    return;
  }

  cookie.set(key, value, { expires: expires });
  log('I\'ve saved "' + key + '" in a cookie :)', 'warning', debug);
}
function setItem ( key , value ) { var expires = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : 1 ; if ( ! isCookieEnabled ) { session . setItem ( key , value ) ; log ( 'I\'ve saved "' + key + '" in a plain object :)' , 'warning' , debug ) ; return ; } cookie . set ( key , value , { expires : expires } ) ; log ( 'I\'ve saved "' + key + '" in a cookie :)' , 'warning' , debug ) ; }
Set the item in the cookies if possible, otherwise is going to store it
inside a plain object
@param {String} key
@param {String} value
@param {Number} [expires=1]
Set the item in the cookies if possible otherwise is going to store it inside a plain object