Permalink
Browse files

add resolve convenience function to util

  • Loading branch information...
1 parent e18dceb commit d7939c494fc110c3f2404780d5f50ddd7a67fbd2 @nrstott committed Feb 6, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/util.js
View
@@ -93,3 +93,11 @@ exports.reject = function(reason) {
return deferred.promise;
}
+
+exports.resolve = function(val) {
+ var deferred = q.defer();
+
+ deferred.resolve(val);
+
+ return deferred.promise;
+}

0 comments on commit d7939c4

Please sign in to comment.