In my scenario I return a promise when I'm making a request.
In the end I resolve/reject the deferred obj.
I want to reuse the promise if it hasn't been resolved/rejected.
Any info would be useful.
I got the answer by looking into q.js source.
deferred.promise.inspect().state
This will return the state of the promise.
returns "fulfilled" if it was resolved or fulfilled
returns "rejected" if it was rejected
returns "pending" if it hasn't been resolved or rejected