index.js
function asPromise (val) {
	if (val && typeof val.then === 'function') {
		return val;
	}
	var deferred = new PromiseFactory();
	deferred.resolve(val);
	return deferred.promise();
}
function asPromise (val) {
	if (val && typeof val.then === 'function') {
		return val;
	}
	var deferred = new PromiseFactory();
	deferred.resolve(val);
	return deferred.promise();
}
function asPromise ( val ) { if ( val && typeof val . then === 'function' ) { return val ; } var deferred = new PromiseFactory ( ) ; deferred . resolve ( val ) ; return deferred . promise ( ) ; }
Helper function to return a resolved promise with a given value
Helper function to return a resolved promise with a given value