code: function createMessageListener(_ref2) {
    var channel = _ref2.channel,
        dispatch = _ref2.dispatch,
        allowed = _ref2.allowed;
  
    var isSynced = false;
    var tabs = {};
    var messageChannel = channel;
    messageChannel.onmessage = function (stampedAction) {
      // ignore if this action is triggered by this window
      // IE bug https://stackoverflow.com/questions/18265556/why-does-internet-explorer-fire-the-window-storage-event-on-the-window-that-st
      if (stampedAction.$wuid === WINDOW_STATE_SYNC_ID || stampedAction.type === RECEIVE_INIT_STATE) {
        return;
      }
      // ignore other values that saved to localstorage.
      if (stampedAction.$uuid && stampedAction.$uuid !== lastUuid) {
        if (stampedAction.type === GET_INIT_STATE && !tabs[stampedAction.$wuid]) {
          tabs[stampedAction.$wuid] = true;
          dispatch(sendIniteState());
        } else if (stampedAction.type === SEND_INIT_STATE && !tabs[stampedAction.$wuid]) {
          if (!isSynced) {
            isSynced = true;
            dispatch(receiveIniteState(stampedAction.payload));
          }
          return;
        } else if (allowed(stampedAction.type)) {
          lastUuid = stampedAction.$uuid;
          dispatch(stampedAction);
        }
      }
    };
  }
docs: export for test