Burrito, delicious static-analysis tool for JavaScript

Few hours ago I got introduced to burrito, a JavaScript lib that can analyze JavaScript code in a super simplified way.

I start playing with it and I love it!


It built up to work on top of node.js

Here is a simple example: generating a list of all the functions

var fs = require('fs');
var burrito = require('burrito');
var functionList = [];
fs.readFile('someFile.js', function (err, data) {
	  if (err) throw err;
	  var dataStr = data.toString();
	  burrito(dataStr, function (node) {
		  if (node.name === 'function' || node.name === 'defun'){

This is fun!

You can even wrap any function-invocation easily utilizing node.wrap(—)..

This makes profiler development much easier than ever before..