Stringifying functions
DayDun opened this issue · 0 comments
DayDun commented
Converting a function to a string can give different results depending on which environment is running the code.
"" + console.log
gives
"function () { [native code] }"
in JStillery while in chrome it gives
"function log() { [native code] }"
and in firefox
"function log() {\n [native code]\n}"
"" + function() {/* Hello world */}
should also return
"function() {/* Hello world */}"
instead of
"function () {\n}"
like it does right now.
I think it would be great if options were added to JStillery where you could specify which environment should be emulated, where you could choose a browser for example.