nl_tokens: Brakes sendbox in one module
pl_tokens: function breakSandbox ( ast , replaceMap ) { var sandboxName = ast [ 2 ] [ 0 ] || 'sb' ; var newAst = walker . with_walkers ( { // lookup for dot // looking for this pattern // ["dot", ["name", "sb"], "require"] -> ["name", map["require"]] "dot" : function ( ) { if ( this [ 1 ] && this [ 1 ] [ 0 ] === "name" && this [ 1 ] [ 1 ] === sandboxName ) { var sourceName = this [ 2 ] ; return [ "name" , replaceMap [ sourceName ] ] ; } } } , function ( ) { return <mask> . walk ( ast ) ; } ) ; // remove IEFE's `sb` or whatever argument newAst [ 1 ] [ 2 ] = [ ] ; return newAst ; }