uxebu / confusion

Simple obfuscator for JavaScript source code
ISC License
31 stars 6 forks source link

[feature request] change the order of strings #3

Open sashee opened 8 years ago

sashee commented 8 years ago

The transformation currently keeps the order of strings the same as they appeared in the codebase. This makes literals that are close to each other (and possibly related to each other) close in the output.

For example in the sample in the readme, the result is ["property", "with", "a string literal", "other", "call", "is", "here"]. I think it would be better to sort them, for example put them in alphabetical order. That would make the example like: ["a string literal", "call", "here", "is", "other", "property", "with"].

This would make larger programs even harder to decypher, as a reader has no idea where to look for related literals.