I need to find out if an object is an instance of
TextEditor, as opposed to something like a
SettingsView. How can I do this? Ideally I could use
if obj instanceof TextEditor but I don’t know how to get the constructor
I could have sworn I’ve done this before but I can’t find it anywhere in my code. Any ideas?
Edit: After digging through core I was able to find TextEditor with this code. But it is really ugly.
for provider in atom.views.providers if (TextEditor = provider.modelConstructor).name is 'TextEditor' break