kriskowal/q — pull request #457 by ljharb (2013-12-30 19:06:42+00:00)
Title: Adding Q.isDeferred

Per https://twitter.com/kriskowal/status/417718297333747713:

Q doesn't expose the raw `Deferred` constructor, so the only way I found to determine if an object is a Q Deferred without ducktyping was `deferred instanceof Q.defer().constructor`. This makes the Deferred-related APIs more consistent with the Promise-related ones, a la isPromise.

My use case: I'm writing another module, and I want to write tests that ensure a method returns a Deferred. I can't do that without a way to verify that it's a Deferred or not.