What I'm trying to do is build a dual purpose JavaScript that might run inside or outside of SharePoint, so I need something like this:
if(SharePoint CSOM Exists)
{
//Do a bunch of stuff involving the SharePoint CSOM as well
}
else
{
//We can run outside of SharePoint as well
}
Is there a standard for doing this? My hunch says it's just if(SP){} but wanted to double check.