Let us say I have the following object constructor:
function Foo(bar) {
this.bar = bar;
}
If I run the function in the global scope wit
I have one good reason to avoid it: if you're not forgetting to use new, then it's just unnecessary overhead. You may never notice this unless you're creating thousands of instances of a given object, but it's still there.
I recommend limiting the number of places in your code where new-based object creation is done - if you're not relying on it every place you need a new object, then you don't have to worry about forgetting it in one of them. There are numerous patterns that can help you here, but the simplest one is to just make one function somewhere that's responsible for object creation, and defer to that every time - whether it creates 1 instance or 1,000,000 instances is up to you.
That said, if this doesn't make sense then this sort of guard is an excellent fallback. Note that it bears a lot of similarity to how JavaScript's built-in type constructors double as type converters when used without new - so I would consider user-defined types as a particularly apt place to use this technique.