I only get [Function] when I try to display a function:
> var a = function(){ return 'toto'; } undefined > a [Function] > require('util').inspect(a) '[Function]'
Use toString :
toString
> var a = function(){ return 'toto'; } undefined > a.toString() 'function (){ return \'toto\'; }'
Source: https://habr.com/ru/post/920477/More articles:C # - DataGridView - image and text on one line - c #How to start using Twitter Bootstrap and Sass in a Sinatra project? - sassOriginal URL Slim Framework - phpWhat is the use of the cloned interface in java? - javaHow to create CFArrayRef - iosUnable to detect MPMoviePlayerDidExitFullscreenNotification - iosdisable submit button if inputs are empty with jQuery - jqueryIOS app - protocol definition in a separate file - iosJavascript button is disabled until all fields are filled - javascriptHow to force the whole package to use the __future__ directive? - pythonAll Articles