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 1
1
const process = { env : { ALGORITHM_VISUALIZER : '1' } } ;
2
2
importScripts ( 'https://unpkg.com/algorithm-visualizer@latest/dist/algorithm-visualizer.js' ) ;
3
- importScripts ( 'https://unpkg.com/babel-standalone@6/babel.min.js' ) ;
4
3
5
4
const sandbox = code => {
6
5
const require = name => ( { 'algorithm-visualizer' : AlgorithmVisualizer } [ name ] ) ; // fake require
@@ -9,7 +8,7 @@ const sandbox = code => {
9
8
10
9
onmessage = e => {
11
10
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' ) ;
13
12
sandbox ( code ) ;
14
13
postMessage ( AlgorithmVisualizer . Tracer . traces ) ;
15
14
} ;
You can’t perform that action at this time.
0 commit comments