How to view a function body in node.js?

I only get [Function] when I try to display the function :

> var a = function(){ return 'toto'; }
> a
> require('util').inspect(a)


Use toString:

> var a = function(){ return 'toto'; }
> a.toString()
'function (){ return \'toto\'; }'

Need Your Help

ASP.NET Identity vs Simple membership Pros and Cons? simplemembership

In MVC4 we had Simple Membership. My opinion is that Simple Membership was a good Identity Model tried and tested with good documentation and didn't need to be fixed but simply needed an upgrade in...

Why do event handlers always have a return type of void?

c# .net events event-handling

Hey, I wondered why is it that the return type of events such as