function onToken(e, token) {
  var state = store.getState();

  if(state.appToken !== token) {
    // Update only when changed
    state.appToken = token;
    store.setState(state);

    return true;
  }

  return false;
}
/**
 * Triggered when appToken was changed on the page
 * @param {Event} e
 * @param {String} token application token
 */
Triggered when appToken was changed on the page
@param {Event} e
@param {String} token application token
Triggered when appToken was changed on the page @param { Event } e @param { String } token application token
function onToken(e, token) {
  var state = store.getState();
  if(state.appToken !== token) {
    state.appToken = token;
    store.setState(state);
    return true;
  }
  return false;
}
function onToken ( e , token ) { var state = store . getState ( ) ; if ( state . appToken !== token ) { state . appToken = token ; store . setState ( state ) ; return true ; } return false ; }
Triggered when appToken was changed on the page
 @param {Event} e
 @param {String} token application token
Triggered when appToken was changed on the page @param { Event } e @param { String } token application token
// Update only when changed