File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change 11const process = { env : { ALGORITHM_VISUALIZER : '1' } } ;
22importScripts ( 'https://unpkg.com/algorithm-visualizer@latest/dist/algorithm-visualizer.js' ) ;
3- importScripts ( 'https://unpkg.com/babel-standalone@6/babel.min.js' ) ;
43
54const sandbox = code => {
65 const require = name => ( { 'algorithm-visualizer' : AlgorithmVisualizer } [ name ] ) ; // fake require
@@ -9,7 +8,7 @@ const sandbox = code => {
98
109onmessage = e => {
1110 const lines = e . data . split ( '\n' ) . map ( ( line , i ) => line . replace ( / ( .+ \. * d e l a y * ) ( \( * \) ) / g, `$1(${ i } )` ) ) ;
12- const { code } = Babel . transform ( lines . join ( '\n' ) , { presets : [ 'es2015' ] } ) ;
11+ const code = lines . join ( '\n' ) ;
1312 sandbox ( code ) ;
1413 postMessage ( AlgorithmVisualizer . Tracer . traces ) ;
1514} ;
You can’t perform that action at this time.
0 commit comments