@@ -1223,37 +1223,6 @@ function regexpEscape(s) {
12231223  return  s . replace ( / [ - [ \] { } ( ) * + ? . , \\ ^ $ | # \s ] / g,  '\\$&' ) ; 
12241224} 
12251225
1226- 
1227- /** 
1228-  * Converts commands that use var and function <name>() to use the 
1229-  * local exports.context when evaled. This provides a local context 
1230-  * on the REPL. 
1231-  * 
1232-  * @param  {String } cmd The cmd to convert. 
1233-  * @return  {String } The converted command. 
1234-  */ 
1235- // TODO(princejwesley): Remove it prior to v8.0.0 release 
1236- // Reference: https://github.com/nodejs/node/pull/7829 
1237- REPLServer . prototype . convertToContext  =  util . deprecate ( function ( cmd )  { 
1238-   const  scopeVar  =  / ^ \s * v a r \s * ( [ \w $ ] + ) ( .* ) $ / m; 
1239-   const  scopeFunc  =  / ^ \s * f u n c t i o n \s * ( [ \w $ ] + ) / ; 
1240-   var  matches ; 
1241- 
1242-   // Replaces: var foo = "bar";  with: self.context.foo = bar; 
1243-   matches  =  scopeVar . exec ( cmd ) ; 
1244-   if  ( matches  &&  matches . length  ===  3 )  { 
1245-     return  'self.context.'  +  matches [ 1 ]  +  matches [ 2 ] ; 
1246-   } 
1247- 
1248-   // Replaces: function foo() {};  with: foo = function foo() {}; 
1249-   matches  =  scopeFunc . exec ( this . bufferedCommand ) ; 
1250-   if  ( matches  &&  matches . length  ===  2 )  { 
1251-     return  matches [ 1 ]  +  ' = '  +  this . bufferedCommand ; 
1252-   } 
1253- 
1254-   return  cmd ; 
1255- } ,  'replServer.convertToContext() is deprecated' ,  'DEP0024' ) ; 
1256- 
12571226// If the error is that we've unexpectedly ended the input, 
12581227// then let the user try to recover by adding more input. 
12591228function  isRecoverableError ( e ,  code )  { 
0 commit comments