@ -39,13 +39,13 @@ const debug = util.debuglog('repl');
const parentModule = module ;
const replMap = new WeakMap ( ) ;
const GLOBAL_OBJECT_PROPERTIES = [ 'NaN' , 'Infinity' , 'undefined' ,
'eval' , 'parseInt' , 'parseFloat' , 'isNaN' , 'isFinite' , 'decodeURI' ,
'decodeURIComponent' , 'encodeURI' , 'encodeURIComponent' ,
'Object' , 'Function' , 'Array' , 'String' , 'Boolean' , 'Number' ,
'Date' , 'RegExp' , 'Error' , 'EvalError' , 'RangeError' ,
'ReferenceError' , 'SyntaxError' , 'TypeError' , 'URIError' ,
'Math' , 'JSON' ] ;
const GLOBAL_OBJECT_PROPERTIES = [
'NaN' , 'Infinity' , 'undefined' , ' eval' , 'parseInt' , 'parseFloat' , 'isNaN' ,
'isFinite' , 'decodeURI' , ' decodeURIComponent' , 'encodeURI' ,
'encodeURIComponent' , ' Object' , 'Function' , 'Array' , 'String' , 'Boolean' ,
'Number' , ' Date' , 'RegExp' , 'Error' , 'EvalError' , 'RangeError' ,
'ReferenceError' , 'SyntaxError' , 'TypeError' , 'URIError' , 'Math' , 'JSON'
] ;
const GLOBAL_OBJECT_PROPERTY_MAP = { } ;
GLOBAL_OBJECT_PROPERTIES . forEach ( ( p ) => GLOBAL_OBJECT_PROPERTY_MAP [ p ] = p ) ;
@ -1216,12 +1216,13 @@ function addStandardGlobals(completionGroups, filter) {
// Common keywords. Exclude for completion on the empty string, b/c
// they just get in the way.
if ( filter ) {
completionGroups . push ( [ 'break' , 'case' , 'catch' , 'const' ,
'continue' , 'debugger' , 'default' , 'delete' , 'do' , 'else' ,
'export' , 'false' , 'finally' , 'for' , 'function' , 'if' ,
'import' , 'in' , 'instanceof' , 'let' , 'new' , 'null' , 'return' ,
'switch' , 'this' , 'throw' , 'true' , 'try' , 'typeof' , 'undefined' ,
'var' , 'void' , 'while' , 'with' , 'yield' ] ) ;
completionGroups . push ( [
'break' , 'case' , 'catch' , 'const' , 'continue' , 'debugger' , 'default' ,
'delete' , 'do' , 'else' , 'export' , 'false' , 'finally' , 'for' , 'function' ,
'if' , 'import' , 'in' , 'instanceof' , 'let' , 'new' , 'null' , 'return' ,
'switch' , 'this' , 'throw' , 'true' , 'try' , 'typeof' , 'undefined' , 'var' ,
'void' , 'while' , 'with' , 'yield'
] ) ;
}
}