SlimIt knows how to minify object access

by Ruslan Spivak on December 27, 2011

SlimIt got a new feature – object access minification.

Let’s give it a try:

>>> from slimit import minify
>>> minify('foo["bar"];') == 'foo.bar;'
True

But if the object attribute is not a legitimate identifier minification does nothing:

>>> minify('foo["bar bar"];')
'foo["bar bar"];'

This is not a part of an official release yet, but you can clone it and install from GitHub.
Let me know if you have any issues with it.

If you enjoyed this post why not subscribe via email or my RSS feed and get the latest updates immediately. You can also follow me on GitHub or Twitter.

Speak your mind

Previous post:

Next post: