Optimizations - Stuk/promise-me GitHub Wiki
Q specific
return Q.resolve(x)
-> return x
return Q.reject(x)
-> Q.reject(new Error(x))
given that typeof x == "string"
deferred.reject(x)
-> deferred.reject(new Error(x))
given that typeof x == "string"