dist/vue-inview.js
function (cls, el, mdf) {
  var display = el.getAttribute('animate-display')
  if (display !== null) {
    el.style.display= dispay
  } else {
    var none = el.getAttribute('animate-display-none')
    if (none === null || none !== 'false') {
      el.style.display= 'block'
    }
  }
  if (isString(cls)) {
    if (isDefine(mdf)) {
      var inverseAnim = animate_direction(cls, mdf)
      if (isDefine(inverseAnim) && classList(el).hasClass(inverseAnim)) {
        var rmClass = {}
        rmClass[inverseAnim] = false
        object_class(rmClass, el)
      }
    }
    var hasToggling = false
    if (classList(el).hasClass(cls)) {
      hasToggling = true
      var rmClass = {}
      rmClass[cls] = false
      object_class(rmClass, el)
    }
    if (isDefine(mdf) && hasToggling) {
      var inverseAnim = animate_direction(cls, mdf)
      if (isDefine(inverseAnim)){
        object_class(inverseAnim, el)
      }
    } else {
      var animate = !classList(el).hasClass('animated') ? ['animated', cls] : cls
      object_class(animate, el)
    }
  }
  if (isArray(cls)) {
    var i = 0
    var size = cls.length
    var iClass
    var animate
    for (i; i < size; i++) {
      if (classList(el).hasClass(cls[i])) {
        var rmClass = {}
        rmClass[cls[i]] = false
        iClass = i
        object_class(rmClass, el)
      }
    }
    if (isDefine(mdf) && mdf === 'toggle') {
      var getClass = isDefine(iClass) && size > 0 && (iClass + 1) < size ?  cls[(iClass + 1)] : cls[0]
      animate = !classList(el).hasClass('animated') ? ['animated', getClass] : getClass
    } else {
      animate = !classList(el).hasClass('animated') ? cls.push('animated') : cls
    }
    object_class(animate, el)
  }
}
function (cls, el, mdf) {
  var display = el.getAttribute('animate-display')
  if (display !== null) {
    el.style.display= dispay
  } else {
    var none = el.getAttribute('animate-display-none')
    if (none === null || none !== 'false') {
      el.style.display= 'block'
    }
  }
  if (isString(cls)) {
    if (isDefine(mdf)) {
      var inverseAnim = animate_direction(cls, mdf)
      if (isDefine(inverseAnim) && classList(el).hasClass(inverseAnim)) {
        var rmClass = {}
        rmClass[inverseAnim] = false
        object_class(rmClass, el)
      }
    }
    var hasToggling = false
    if (classList(el).hasClass(cls)) {
      hasToggling = true
      var rmClass = {}
      rmClass[cls] = false
      object_class(rmClass, el)
    }
    if (isDefine(mdf) && hasToggling) {
      var inverseAnim = animate_direction(cls, mdf)
      if (isDefine(inverseAnim)){
        object_class(inverseAnim, el)
      }
    } else {
      var animate = !classList(el).hasClass('animated') ? ['animated', cls] : cls
      object_class(animate, el)
    }
  }
  if (isArray(cls)) {
    var i = 0
    var size = cls.length
    var iClass
    var animate
    for (i; i < size; i++) {
      if (classList(el).hasClass(cls[i])) {
        var rmClass = {}
        rmClass[cls[i]] = false
        iClass = i
        object_class(rmClass, el)
      }
    }
    if (isDefine(mdf) && mdf === 'toggle') {
      var getClass = isDefine(iClass) && size > 0 && (iClass + 1) < size ?  cls[(iClass + 1)] : cls[0]
      animate = !classList(el).hasClass('animated') ? ['animated', getClass] : getClass
    } else {
      animate = !classList(el).hasClass('animated') ? cls.push('animated') : cls
    }
    object_class(animate, el)
  }
}
(cls → string | array, el → dom, mdf → string)
- inview animation handler