5 ms·
it's possible to use a code formatter to expand a minified file If you go to that length you can just as well use a decompiler, no difference.
by moe 14y ago
it's possible to use a code formatter to expand a minified file
If you go to that length you can just as well use a decompiler, no difference.
- beagle3 14y agoHuge difference. Minified files, more often than not, have the original identifiers, original code structure (e.g. you know a for from a while ). With a decompiler, you lose all of that. Google closure is a compiler (and thus loses a lot of this data), but most minifiers are not semantically destructive.
- moe 14y agoMany other minifiers also munge the symbols (e.g. YUI compressor). And why should this process retain anything anyways? If you want your source-code available for download then... put up a download link.
- beagle3 14y ago> And why should this process retain anything anyways? Because javascript has some reflection, and also because of weird scoping rules (with, eval, etc.) you can never be sure where a symbol comes from unless you have access to the exact version of every other script on the page, e.g. jquery, etc) > If you want your source-code available for download then... put up a download link. I agree - but there is still a huge difference between deminified and decompiled source readbility - which is all I was saying.