arranged and formatted nonContextGlobals list in REPL

This commit is contained in:
Michael Ficarra
2011-07-11 13:08:47 -04:00
parent 07baed89ed
commit cb8e147212
2 changed files with 6 additions and 2 deletions

View File

@@ -18,7 +18,7 @@
};
backlog = '';
sandbox = Script.createContext();
nonContextGlobals = ['clearInterval', 'Buffer', 'setTimeout', 'console', 'process', 'clearTimeout', 'setInterval'];
nonContextGlobals = ['Buffer', 'console', 'process', 'setInterval', 'clearInterval', 'setTimeout', 'clearTimeout'];
for (_i = 0, _len = nonContextGlobals.length; _i < _len; _i++) {
g = nonContextGlobals[_i];
sandbox[g] = global[g];

View File

@@ -33,7 +33,11 @@ backlog = ''
# The REPL context; must be visible outside `run` to allow for tab completion
sandbox = Script.createContext()
nonContextGlobals = ['clearInterval', 'Buffer', 'setTimeout', 'console', 'process', 'clearTimeout', 'setInterval']
nonContextGlobals = [
'Buffer', 'console', 'process'
'setInterval', 'clearInterval'
'setTimeout', 'clearTimeout'
]
sandbox[g] = global[g] for g in nonContextGlobals
sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox