kriskowal/q — pull request #566 by vilic (2014-08-10 02:40:39+00:00)
Title: use instanceof to determine whether an object is a Q promise (isPromise function).

Considering modules using nested Q may have different versions or plugins (yup, such as my q-retry), I think it would be safer to determine whether the Q-promise-alike object is the instance of current Q promise constructor. So that the promise chain would be more reliable especially when promises are widely used in different modules.

This would bring a little bit performance impact, but it should be considered minor (actually only one more coerce for two modules and a single chain).

Since Q.isPromise is exposed, this change might influence developers who are already using this approach.