src/vex.js
function addClasses (el, classStr) {
  if (typeof classStr !== 'string' || classStr.length === 0) {
    return
  }
  var classes = classStr.split(' ')
  for (var i = 0; i < classes.length; i++) {
    var className = classes[i]
    if (className.length) {
      el.classList.add(className)
    }
  }
}
function addClasses (el, classStr) {
  if (typeof classStr !== 'string' || classStr.length === 0) {
    return
  }
  var classes = classStr.split(' ')
  for (var i = 0; i < classes.length; i++) {
    var className = classes[i]
    if (className.length) {
      el.classList.add(className)
    }
  }
}
function addClasses ( el , classStr ) { if ( typeof classStr !== 'string' || classStr . length === 0 ) { return } var classes = classStr . split ( ' ' ) for ( var i = 0 ; i < classes . length ; i ++ ) { var className = classes [ i ] if ( className . length ) { el . classList . add ( className ) } } }
Utility function to add space-delimited class strings to a DOM element's classList
Utility function to add space - delimited class strings to a DOM element s classList