@@ -0,0 +1,607 @@
+%0A// autoInstance could be used as a function or as a constructor%0Afunction autoInstance( elements ) %7B%0A  // But a function could not return an instantiation of himself without make an infinite loop%0A  return new autoInstance.prototype.init( elements );%0A%7D%0A%0A// Definition of the autoInstance object%0AautoInstance.prototype = %7B%0A  init: function() %7B%0A%0A    // initialization code%0A%0A  %7D,%0A  someMethod: function()%7B%0A  %7D%0A%7D%0A%0A// Simulate that a autoInstance.prototype.init object is like a autoInstance object%0AautoInstance.prototype.constructor = autoInstance;%0AautoInstance.prototype.init.prototype = autoInstance.prototype;

Add the auto-instance pattern inspired by jQuery