Hirse / brackets-outline-list

Extension for Brackets and Phoenix to display a list of the functions or definitions in the currently opened document.
MIT License
79 stars 32 forks source link

Organize JavaScript (ES5) function by "Class" #61

Open doom-fr opened 8 years ago

doom-fr commented 8 years ago

I would like to have javascript functions organized by "Class"

For example :

function Person(name,age) {
  this.name = name;
  this.age = age;
}
Person.prototype.sayHello = function() {
  console.log("Hi, my name is " + this.name);
};
Person.prototype.sayAge = function() {
  console.log("I am " + this.age + " years old");
};

Is it possible to organize them like this :

Person(name,age)
 - Person.sayHello()
 - Person.sayAge()
Hirse commented 7 years ago

If you switch to ES6 classes the outline should be organized as expected. 😉

For ES5 syntax however this would mean a big change, so no guarantee this will be added.

ray007 commented 4 years ago

If you switch to ES6 classes the outline should be organized as expected. 😉

For ES5 syntax however this would mean a big change, so no guarantee this will be added.

Looking good until I choose "Sort Entries", which does not respect hierarchy level.