diff --git a/lib/repl.js b/lib/repl.js index 302e79f9a2..29f25a5c37 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -254,12 +254,6 @@ function REPLServer(prompt, // an expression. cmd = `(${cmd})`; self.wrappedCmd = true; - } else { - // Mitigate https://github.com/nodejs/node/issues/548 - cmd = cmd.replace( - /^\s*function(?:\s*(\*)\s*|\s+)([^(]+)/, - (_, genStar, name) => `var ${name} = function ${genStar || ''}${name}` - ); } // Append a \n so that it will be either // terminated, or continued onto the next expression if it's an