-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function.toString()
returning strange strings
#3248
Comments
This is very bad and in violation of the ES specs. |
Bun runs the JavaScript minifier on every file by default, which means the input source is not exactly the output source. It's reasonable to suggest we modify On the other hand, if you must rely on the output of |
are you still able to reproduce this? it appears to be working for me in Bun 1.1.9 (you may need to run
|
@nektro this should continue to occur. We don't do quite as much minification as we did before, but we still do remove comments, some conditional expressions, and we transform function statements into function expressions. |
What version of Bun is running?
0.6.7
What platform is your computer?
Darwin 22.5.0 arm64 arm
What steps can reproduce the bug?
run the following code with
bun
andnode
What is the expected behavior?
What do you see instead?
Additional information
I figured if the return value of a function is not used it gets appended with a comma somehow?
The text was updated successfully, but these errors were encountered: