Skip to content

Stringifying functions #31

@DayDun

Description

@DayDun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions