I have a situation where I need to check if a constructor (X) has another constructor (Y) in its prototype chain (or is Y itself).
The quickest means to do this migh
There's also Object.prototype.isPrototypeOf(). Seems like a perfect use case, no?
Babel
class A {} class B extends A {} class C extends B {} console.log(C === C) console.log(B.isPrototypeOf(C)) console.log(A.isPrototypeOf(C))