lib/request_browser.js
function done() {

			if (!error && xhr.status > 399) {
				error = new Error(xhr.statusText);
				error.status = error.number = xhr.status;
			}

			if (type && type.indexOf('json') > -1 && result) {
				result = Collection.JSON.undry(result);
			}

			if (error) {
				error.result = result;
				pledge.reject(error);
				that.error = error;
			} else {
				that.result = result;
				pledge.resolve(result);
			}
		}
function done() {

			if (!error && xhr.status > 399) {
				error = new Error(xhr.statusText);
				error.status = error.number = xhr.status;
			}

			if (type && type.indexOf('json') > -1 && result) {
				result = Collection.JSON.undry(result);
			}

			if (error) {
				error.result = result;
				pledge.reject(error);
				that.error = error;
			} else {
				that.result = result;
				pledge.resolve(result);
			}
		}
function done ( ) { if ( ! error && xhr . status > 399 ) { error = new Error ( xhr . statusText ) ; error . status = error . number = xhr . status ; } if ( type && type . indexOf ( 'json' ) > - 1 && result ) { result = Collection . JSON . undry ( result ) ; } if ( error ) { error . result = result ; pledge . reject ( error ) ; that . error = error ; } else { that . result = result ; pledge . resolve ( result ) ; } }
Function that'll cleanup the request & resolve or reject the pledge
Function that ll cleanup the request & resolve or reject the pledge