Resolution

It’s January 2nd and time for my year of posting interesting things I find in the great land of JavaScirpt (the greatest language). I’ve been looking at traversing trees recursively lately. The most important point is to know your exit case:

This was for a hackathon project that required I spell out a trace from a JavaScript file to a specific PHP endpoint and as we use MVC, a controller action that represents a URL. For example:

file.js -> […ancestors.js] -> […inclusions.php] -> […inclusions_ancesotrs.php] -> […related_controllers.php]

I’m thinking we could have had an easier time traversing an AST tree but that might be for another post.