Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Using $ for mangled function names conflicts with jQuery #36

rivol opened this Issue · 2 comments

2 participants


I have a "class" function with many subfunctions inside of it. When compressing it with Slimit, the function name mangling uses $ and _ for function names which results in errors because I am using jQuery and expect $ to remain reserved for jQuery.

See the testcase at
Names of functions 52 and 53 are mangled to $ and _ which breaks jQuery usage.

$ and _ are both used by popular JS libraries (jQuery and Underscore.js) so I'd suggest not to use them for function names.

Removing those 2 chars from ID_CHARS in fixes the problem for me, but I don't know if it might have any side effects.

@rspivak rspivak was assigned

Thanks for filing the issue. I'll look into it.


Fixed in ada895e

@rspivak rspivak closed this
@lelit lelit referenced this issue from a commit in lelit/slimit
@rspivak Bug fix: rspivak#36 ada895e
@acatton acatton referenced this issue from a commit in acatton/slimit
@rspivak Bug fix: rspivak#36 1ae4284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.