Wraps all global statements and functions into a single self-executing function, replacing global identifier references with local ones. The longer the code, the more complex the generated local references become.
Without Code Transposition:
function logit(){
}
function mylogic(){
logit()
}
With Code Transposition:
var logit,mylogic;
(function(){
function a(){
}
function b(){
a()
}
logit=a;mylogic=b;
})()
Compatibility note: Global identifier replacement does not affect local references. If you need a function to be overridable, use var myFunc = function(){} instead of function myFunc(){}.