Turns indentation into {curly brackets} Great for a yml to json converter or something. Credit to @maettig for writing all* the code.
Turn this:
if(3==3)
alert("obviously!")
alert("lol!")
Into:
if(3==3){
alert("obviously!")
alert("lol!")
}
jsperf showing the different methods:
http://jsperf.com/blockifyindents
*almost
You can save a few bytes. Also your version leaked the variable e to the global scope. You may find my dumpGlobalLeaks helpful.