Subj : Re: Compacting JS source via ParseTree or Decompile To : netscape.public.mozilla.jseng From : Brendan Eich Date : Sat Jun 05 2004 07:07 pm Brendan Eich wrote: > js> uneval(s) > (new Script('\nfunction f() {\n return 42;\n}\n\n\nfunction g(x, y) > {\n return x * y;\n}\n\nprint("hi!");\n')) > > Note that uneval on a Script object calls toSource, which compresses > unprettily; whereas the shell calls toString, which pretty-prints. Er, misspoke. uneval's output is clearly pretty-printed, but escaped in a string. You can see the embedded \n and spaces for indentation. Jesse if you are out there, please remind me of the bug where the extra newlines around functions changed, or something like that. /be .