lib/bamboo.js
function(host, username, password) {
        var defaultUrl = "http://localhost:8085";

        host = host || defaultUrl;

        if (username && password) {
            var protocol = host.match(/(^|\s)(https?:\/\/)/i);

            if (_.isArray(protocol)) {
                protocol = _.first(protocol);

                var url = host.substr(protocol.length);

                host = protocol + username + ":" + password + "@" + url;
            }
        }

        this.host = host || defaultUrl;
    }
function(host, username, password) {
        var defaultUrl = "http://localhost:8085";

        host = host || defaultUrl;

        if (username && password) {
            var protocol = host.match(/(^|\s)(https?:\/\/)/i);

            if (_.isArray(protocol)) {
                protocol = _.first(protocol);

                var url = host.substr(protocol.length);

                host = protocol + username + ":" + password + "@" + url;
            }
        }

        this.host = host || defaultUrl;
    }
function ( host , username , password ) { var defaultUrl = "http://localhost:8085" ; host = host || defaultUrl ; if ( username && password ) { var protocol = host . match ( / (^|\s)(https?:\/\/) / i ) ; if ( _ . isArray ( protocol ) ) { protocol = _ . first ( protocol ) ; var url = host . substr ( protocol . length ) ; host = protocol + username + ":" + password + "@" + url ; } } this . host = host || defaultUrl ; }
Function defining a Bamboo instance

@param {String} host - hostname. By default "http://localhost:8085"
@param {String=} username - optional param for base HTTP authentication. Username
@param {String=} password - optional param for base HTTP authentication. Password
@constructor
Function defining a Bamboo instance