I want to test if a variable is an instance of the current class. So I'm checking within a method of the class. And I was hoping there's a more abstract way of doing than specifying the class name. In PHP it's possible with the self keyword.
In PHP it's done like this:
if ($obj instanceof self) {
}
What's the equivalent in nodejs ?
thing instanceof this.constructor
.this
in static methods and asthis.constructor
in instance methods.