hex13 / atom-lupa

Atom extension which displays outline for JavaScript files
MIT License
41 stars 4 forks source link

DONE: name detection for `foo.bar.functionName = function () {}` #23

Closed hex13 closed 8 years ago

hex13 commented 8 years ago

As a user I would like to find functions by name assigned to namespace, even if they technically have no name (from JS parser point of view):

for example this code:

ReactComponent.prototype.setState = function(partialState, callback) {

reports that function doesn't have name: image

...because it's true from JS point of view (and from parser point of view). Nevertheless for end user (who just wants to find function/see it in sidebar) it probably doesn't matter.

I did experimented with detection of namespace assignments so there is probably code which can be reused.

hex13 commented 8 years ago

done. https://github.com/hex13/lupa/commit/0e0e60245588eb4bfb56a604c7120de7329fed24 https://github.com/hex13/lupa/commit/3cae2a878116c37a2cf21a2142cc247434262ad5