fnbody Stringifies the contents of a function body. Install npm install fnbody bower install fnbody Usage var fnbody = require('fnbody'); function foo() { var foo = 'bar'; return function(qux) { return foo + qux; };} console.log(fnbody(foo)); // " var foo = \'bar\';\n return function(qux) {\n return foo + qux;\n };"); Test npm test License MIT