index.js
function PromiseFactory() {
	var deferred = whenjs.defer();
	//var timeout = setTimeout(function () { console.log(t, 'Promise timed out')}, 3000);

	this.reject = function (err) {
		deferred.reject(err);
	};
	this.resolve = function (val) {
	//	clearTimeout(timeout);
		deferred.resolve(val);
	};
	this.promise = function () {
		return deferred.promise;
	};
}
function PromiseFactory() {
	var deferred = whenjs.defer();
	//var timeout = setTimeout(function () { console.log(t, 'Promise timed out')}, 3000);

	this.reject = function (err) {
		deferred.reject(err);
	};
	this.resolve = function (val) {
	//	clearTimeout(timeout);
		deferred.resolve(val);
	};
	this.promise = function () {
		return deferred.promise;
	};
}
function PromiseFactory ( ) { var deferred = whenjs . defer ( ) ; //var timeout = setTimeout(function () { console.log(t, 'Promise timed out')}, 3000); this . reject = function ( err ) { deferred . reject ( err ) ; } ; this . resolve = function ( val ) { //	clearTimeout(timeout); deferred . resolve ( val ) ; } ; this . promise = function ( ) { return deferred . promise ; } ; }
Make an object with properly-bound `resolve` and `reject`
Make an object with properly - bound resolve and reject