I went through broccoli plugins and I see this line a lot. What is it used for?
function MyCompiler (arg1, arg2, ...) { if (!(this instanceof MyCompiler)) return new MyCompiler(arg1, arg2, ...); ... };
This means that you can use it with newor without a keyword .
new
eg:.
var comp = new MyCompiler();
or
var comp = MyCompiler();
If you call it as a function, it will call itself with a keyword newand return an instance.