src/ScraperPromise.js
function(code, callback) {
		if (typeof code == 'function') {
			callback = code;
			this.promises.push(function onGenericStatusCode(done, utils) {
				done(null, callback(this.scraper.getStatusCode(), utils));
			});
		} else {
			this.promises.push(function onStatusCode(done, utils) {
				if (code === this.scraper.getStatusCode()) {
					done(null, callback(utils));
				} else {
					done(null, utils.lastReturn);
				}

			});
		}
		return this;
	}
function(code, callback) {
		if (typeof code == 'function') {
			callback = code;
			this.promises.push(function onGenericStatusCode(done, utils) {
				done(null, callback(this.scraper.getStatusCode(), utils));
			});
		} else {
			this.promises.push(function onStatusCode(done, utils) {
				if (code === this.scraper.getStatusCode()) {
					done(null, callback(utils));
				} else {
					done(null, utils.lastReturn);
				}

			});
		}
		return this;
	}
function ( code , callback ) { if ( typeof code == 'function' ) { callback = code ; this . promises . push ( function onGenericStatusCode ( done , utils ) { done ( null , callback ( this . scraper . getStatusCode ( ) , utils ) ) ; } ) ; } else { this . promises . push ( function onStatusCode ( done , utils ) { if ( code === this . scraper . getStatusCode ( ) ) { done ( null , callback ( utils ) ) ; } else { done ( null , utils . lastReturn ) ; } } ) ; } return this ; }
Sets a promise for a status code, of a response of a request.

@param  {!(number|function(number))} code Status code to
dispatch the message. Or a callback function, in this case
the function's first parameter is the status code, as a
number.
@param  {!function()} callback Callback function for the case
where the status code is provided.
@return {!ScraperPromise} This object, so that new promises can
be made.
@public
Sets a promise for a status code of a response of a request .