GithubHelp home page GithubHelp logo

Comments (5)

megaboich avatar megaboich commented on July 21, 2024

Hi,

left map does not show all the functions

It would be great if you attach some samples - source code and screenshots are welcome

show functions (anonymous vs named) and objects in different colors.

That is possible and not very hard to implement. But right now anonymous functions got a special (?) icon in the tree. Isn't it enough?

drag and drop sections in the code map to move the code around in source window

That is really nice concept, but I am not sure about complexity. It seems far beyond my expectations of simple plugin that shows the code map. In general I am sure that source code must be developed in text editor and must be separated through a lot of files - just to separate all logic. This plugin shows code map only for navigating purposes - sometimes you have old legacy code written in giant single file, or code is bundled together and you don't have sources.

from js-map-parser.

powersparks avatar powersparks commented on July 21, 2024

I am seeing a similar issue with jQuery anonymous functions. "click" should have the "#button". see attached image

capture

from js-map-parser.

megaboich avatar megaboich commented on July 21, 2024

Hi powersparks,
Thanks for your interest.
Indeed, that was behavior in previous version that anonymous function aliases were containing parameter values from calling function. But that functionality was a bit buggy in case of call chaining.
Also after some consideration I decided to shorten aliases in order to clean up structure, because all that parameters were providing a noise.
And also I am not a big fan of anonymous functions that really contains important logic, why not just give name to them? It would help in many cases, especially in profiler to find if it consumes a lot of time during script execution.

$('#button').click(function buttonClickHandler(){
  alert('');
});

Or even separate that function and not inline it to parameters at all?
Thanks for your patience,
Olek.

P.S. I would update release notes for new version to mention this change in behavior.

from js-map-parser.

smartmeter avatar smartmeter commented on July 21, 2024

ok

from js-map-parser.

powersparks avatar powersparks commented on July 21, 2024

That's a great suggestion, I agree.... anonymous functions makes it hard to document too.

from js-map-parser.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.