code: function InView (el, callback, className) {
    var _this = this
    if (!(_this instanceof InView)) {
      return new InView(el, callback)
    }
    _this.el = el
    _this.callback = callback
  
    function check (e) {
      var params = {
        windowScrollTop: getScrollTop(),
        elementOffsetTop: _this.el.offsetTop,
        inViewHeight: window.outerHeight,
        elementOffsetTopInViewHeight: window.outerHeight - (getScrollTop() - (_this.el.offsetTop - window.outerHeight))
      }
      if (isInView(_this.el)) {
        addClass(_this.el, className)
        _this.callback.call(_this.el, true, params)
      } else {
        removeClass(_this.el, className)
        _this.callback.call(_this.el, false, params)
      }
    }
  
    var throttledCheck = throttle(check, 100)
  
    check()
    addEvent(window, 'scroll', throttledCheck)
  }
docs: @desc Create an InView instance.
  
  @class
  @func InView
  @param {HTMLElement} element - element to detect when scrolled to view
  @param {scrollCallback} scrollCallback - callback function fired on scroll event
  @return {HTMLElement} - element
  
  @example
  var el = document.querySelector('.item')
  
  var InView = InView(el, function(isInView, data) {
  if (isInView) {
  console.log('in view')
  } else {
  if (data.windowScrollTop - (data.elementOffsetTop - data.inViewHeight) > data.inViewHeight) {
  console.log('not in view (scroll up)')
  } else {
  console.log('not in view (scroll down)')
  }
  }
  })