Is there a reliable way of getting the instance of a JavaScript object?
For example, relying on the fake \'obj.getInstance()\' function.
obj.getInstance()
var
Only tested on Chrome:
function FooBar() { } var foobar = new FooBar(); console.log(foobar.constructor.name); // Prints 'FooBar'