Is there a tool to generate a flowchart from code?

I just joined a project created using Angular JS, which has many nested promises. Some tasks do not seem to happen in the correct order, which at some point calls some object. I need to check how / when promises are called, which are returned first, etc. The flowchart of what happens with all these promises woudl helps me a lot, unfortunately, it took me a while to do this manually, so I was wondering if there was a tool to automate this. I searched Google but can't find anything like it. Any advice on how to keep track of promises or answers to questions is welcome!

+5
source share
1 answer

Yes, such a tool exists - unfortunately, not for Angular promises, and it is not yet in production - it looks something like this:

enter image description here

See this post on Google+ for a short video.

Unfortunately, it is not yet available to you. Another tool for Angular does not support this use case.

On the other hand, if you are temporarily using Bluebird with Angular , and you are using the bluebird 3.0 branch, it automatically warns you about things like creating promises and not returning them, passing wrong values, etc. in error mode:

(Photos (and code: P) by Petkoy)

+1
source

All Articles