orig/2013-08-21/extend.js
function extend_if_promise(methods, ret) {
		if(ret && ret.then) {                                 // Check if return value is promise compatible
			return extend.promise(methods, ret);              // ..and if so, extend it, too.
		}
		return ret;                                           // ..and if not, return the same value.
	}
function extend_if_promise(methods, ret) {
		if(ret && ret.then) {                                 // Check if return value is promise compatible
			return extend.promise(methods, ret);              // ..and if so, extend it, too.
		}
		return ret;                                           // ..and if not, return the same value.
	}
function extend_if_promise ( methods , ret ) { if ( ret && ret . then ) { // Check if return value is promise compatible return extend . promise ( methods , ret ) ; // ..and if so, extend it, too. } return ret ; // ..and if not, return the same value. }
original extend_promise Extend the value if it's a promise, otherwise just return it instead.
@returns the extended promise or the value itself.
original extend_promise Extend the value if it s a promise otherwise just return it instead .