wow, this is an old one. ...but still very much needed...

I provide you with 2 pieces of code, which do the same:

var rectangle = {
};
rectangle.init = function (width, height) {
  this.height = height;
  this.width = width;
  return this;
}
rectangle.area= function () {
  this.hello();
  return this.width * this.height;
}
rectangle.hello= function () {
  alert('rectangle'); 
}

------------------------

function rectangle() {}
rectangle.prototype.init = function(width, height) {
  this.height = height;
  this.width = width;
  return this;
}
rectangle.prototype.area= function() {
  this.hello();
  return this.width * this.height;
}
rectangle.prototype.hello= function() {
  alert('rectangle'); 
}      

-----
You may see, that a line with
-> '='+[0..n BLANKS]+toLower('function')+BLANK
OR->'='+[0..n BLANKS]+toLower('function')+[0..n BLANKS]+'('
marks a javascript class related function

For php the code explorer offers any kind of tree. Actually I do not think that
this is so important for people. If everything before '=' would be put into the
function list (trimmed and without 'prototype.') for such javascript-lines would
work out for most people already.

-- 
<http://forum.pspad.com/read.php?4,22964,61510>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem