Is there a way to add a method to all javascript functions without using the prototype library?
something along the lines of :
Function.prototype.methodN
Sure. Functions are objects:
var foo = function() {}; Function.prototype.bar = function() { alert("bar"); }; foo.bar();
Will alert "bar"