默认评估


🌐 Default evaluation

默认情况下,所有 repl.REPLServer 实例都使用一个评估函数,该函数可以评估 JavaScript 表达式并访问 Node.js 内置模块。在创建 repl.REPLServer 实例时,可以通过传入替代的评估函数来覆盖此默认行为。

🌐 By default, all instances of repl.REPLServer use an evaluation function that evaluates JavaScript expressions and provides access to Node.js built-in modules. This default behavior can be overridden by passing in an alternative evaluation function when the repl.REPLServer instance is created.