index.js
function (source) {
            packageUrl = source;

            if (source && source.indexOf(bower.config.rhodecode.repo) != -1) {
                return true;
            }

            return Q.nfcall(registryClient.lookup.bind(registryClient), source)
                .then(function (entry) {

                    if (entry && entry.url && entry.url.indexOf(bower.config.rhodecode.repo) != -1) {
                        packageUrl = entry.url;
                        return true
                    }

                    return false;
                });

        }
function (source) {
            packageUrl = source;

            if (source && source.indexOf(bower.config.rhodecode.repo) != -1) {
                return true;
            }

            return Q.nfcall(registryClient.lookup.bind(registryClient), source)
                .then(function (entry) {

                    if (entry && entry.url && entry.url.indexOf(bower.config.rhodecode.repo) != -1) {
                        packageUrl = entry.url;
                        return true
                    }

                    return false;
                });

        }
function ( source ) { packageUrl = source ; if ( source && source . indexOf ( bower . config . rhodecode . repo ) != - 1 ) { return true ; } return Q . nfcall ( registryClient . lookup . bind ( registryClient ) , source ) . then ( function ( entry ) { if ( entry && entry . url && entry . url . indexOf ( bower . config . rhodecode . repo ) != - 1 ) { packageUrl = entry . url ; return true } return false ; } ) ; }
Match method tells whether resolver supports given source It can return either boolean or promise of boolean
Match method tells whether resolver supports given source It can return either boolean or promise of boolean