4 ms·
This works even cooler when you want to minify your code: MyLongClassName = function() {}; function(_c) { _c.prototype.method1 = ...; _c.prototype.method2
by rykov 17y ago
This works even cooler when you want to minify your code:
MyLongClassName = function() {};
function(_c) {
_c.prototype.method1 = ...;
_c.prototype.method2 = ...;
}(MyLongClassName);
This allows something like YUI compressor to shorten _c local variable for every method definition, rather than store "MyLongClassName" for each one.