历史记录


默认情况下,Node.js REPL 将通过将输入保存到位于用户主目录中的 .node_repl_history 文件来保留 node REPL 会话之间的历史记录。 这可以通过设置环境变量 NODE_REPL_HISTORY='' 来禁用。

By default, the Node.js REPL will persist history between node REPL sessions by saving inputs to a .node_repl_history file located in the user's home directory. This can be disabled by setting the environment variable NODE_REPL_HISTORY=''.