code: function () {
    var getWindow = function () { return ({
      width: window.innerWidth,
      height: window.innerHeight,
      scrollX: window.scrollX,
      scrollY: window.scrollY
    }); };
  
    var windowStore = createStore("window", {
      getInitialState: getWindow,
      windowOnResize: function (state, data) { return data; },
      windowOnScroll: function (state, data) { return data; }
    });
  
    function resize() {
      dispatch("windowOnResize", getWindow());
    }
  
    function scroll() {
      dispatch("windowOnScroll", getWindow());
    }
  
    window.onresize = resize;
    window.onscroll = scroll;
  
    return windowStore;
  }
docs: Copyright (c) 2015-2018, JC Fisher