captn.dom.addclass/index.js
function addClass(element, className) {
    if (!hasClassNameProperty(element) || hasClass(element, className)) {
        return;
    }
    element.className = (element.className + ' ' + className).replace(/^\s+|\s+$/g, '');
}
function addClass(element, className) {
    if (!hasClassNameProperty(element) || hasClass(element, className)) {
        return;
    }
    element.className = (element.className + ' ' + className).replace(/^\s+|\s+$/g, '');
}
function addClass ( element , className ) { if ( ! hasClassNameProperty ( element ) || hasClass ( element , className ) ) { return ; } element . className = ( element . className + ' ' + className ) . replace ( / ^\s+|\s+$ / g , '' ) ; }
Adds a class name to the element's list of class names.

@static
@param  {DOMElement} element The DOM element to modify.
@param  {string} className The name to append.
@example

hasClass(el, 'container');
// => false

addClass(el, 'container');

hasClass(el, 'container');
// => true
Adds a class name to the element s list of class names .