cujojs/when — pull request #38 by jonnyreeves (2012-05-15 16:18:11+00:00)
Title: when.defer() handler parameter

Pull request for Issue #37.

Added optional handler parameter to when.defer() which allows you to resolve / reject a deferred without creating any temporary variables, eg:

return when.defer(function (dfd) {
dfd.resolve("It's all good!");
});