src/mdlComponentHandler.js
function findRegisteredClass_(name, optReplace) {
    for (var i = 0; i < registeredComponents_.length; i++) {
      if (registeredComponents_[i].className === name) {
        if (typeof optReplace !== 'undefined') {
          registeredComponents_[i] = optReplace;
        }
        return registeredComponents_[i];
      }
    }
    return false;
  }
function findRegisteredClass_(name, optReplace) {
    for (var i = 0; i < registeredComponents_.length; i++) {
      if (registeredComponents_[i].className === name) {
        if (typeof optReplace !== 'undefined') {
          registeredComponents_[i] = optReplace;
        }
        return registeredComponents_[i];
      }
    }
    return false;
  }
function findRegisteredClass_ ( name , optReplace ) { for ( var i = 0 ; i < registeredComponents_ . length ; i ++ ) { if ( registeredComponents_ [ i ] . className === name ) { if ( typeof optReplace !== 'undefined' ) { registeredComponents_ [ i ] = optReplace ; } return registeredComponents_ [ i ] ; } } return false ; }
Searches registered components for a class we are interested in using.
Optionally replaces a match with passed object if specified.

@param {string} name The name of a class we want to use.
@param {componentHandler.ComponentConfig=} optReplace Optional object to replace match with.
@return {!Object|boolean}
@private
Searches registered components for a class we are interested in using . Optionally replaces a match with passed object if specified .