code: function matchComponent(sModuleName, sPattern) {
  			sModuleName = sModuleName.toLowerCase();
  			sPattern = sPattern.toLowerCase();
  			return (
  				sModuleName === sPattern
  				|| sPattern.match(/\*$/) && sModuleName.indexOf(sPattern.slice(0,-1)) === 0 // simple prefix match
  				|| sPattern.match(/\.\*$/) && sModuleName === sPattern.slice(0,-2) // directory pattern also matches directory itself
  			);
  		}
docs: Function is a copy from: LibraryInfo.js => LibraryInfo.prototype._getActualComponent => "match" inline method