There are some basic patterns for creating promises that are so
common, you will want to use Q's static helpers for them. The most
important of these are Q.resolve
and Q.reject
.
Use Q.resolve
to create either a fulfilled promise, if you pass a
fulfillment value directly, or to simply subsume another promise.
That is, in general,