text: export default (up, down) => {
    var position = window.pageYOffset
    || document.documentElement.scrollTop
    || document.body.scrollTop || 0
    var scroll
  
    window.addEventListener('scroll', ()=> {
      scroll = window.pageYOffset
      || document.documentElement.scrollTop
      || document.body.scrollTop || 0
  
      if ( scroll > position ) {
        if( typeof down === 'function' && down() ) {
          down();
        }
  
      } else {
        if( typeof up === 'function' && up() ) {
          up();
        }
      }
      position = scroll;
    })
  }
  