packages/fbjs/src/core/CSSCore.js
function(element, className, bool) {
    return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className);
  }
function(element, className, bool) {
    return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className);
  }
function ( element , className , bool ) { return ( bool ? CSSCore . addClass : CSSCore . removeClass ) ( element , className ) ; }
Helper to add or remove a class from an element based on a condition.

@param {DOMElement} element the element to set the class on
@param {string} className the CSS className
@param {*} bool condition to whether to add or remove the class
@return {DOMElement} the element passed in
Helper to add or remove a class from an element based on a condition .