Skip to content

Instantly share code, notes, and snippets.

@objectiveSee
Created June 3, 2013 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save objectiveSee/5702031 to your computer and use it in GitHub Desktop.
Save objectiveSee/5702031 to your computer and use it in GitHub Desktop.
shitFinder.findGamesPastDay()
.then(shitFinder.printShit())
.done(function (result) {
console.log('DONE! res=', result); // logs the result from findGamesPastDay instead of foo
process.exit(0)
}, function (error) {
process.exit(1);
});
printShit: function(result) {
// result is undefined!!!!
var deferred = Q.defer();
console.log('priting ', result);
deferred.resolve('foo');
return deferred.promise;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment