From 1acc14baf9ca1cc52f001fbe0453c2a540571c21 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 8 May 2020 02:39:59 +0200 Subject: [PATCH] repl: add builtinModules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds an alias to `_builtinLibs` that is documented and should as such also be accessed publicly. It does not contain any underscored modules. Signed-off-by: Ruben Bridgewater PR-URL: https://github.com/nodejs/node/pull/33295 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso --- doc/api/repl.md | 9 +++++++++ lib/repl.js | 9 ++++++++- test/parallel/test-repl-tab-complete.js | 13 +++++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/doc/api/repl.md b/doc/api/repl.md index d52ff0e7d01..5a2c35f4a1c 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -540,6 +540,15 @@ by default. However, this is not the case when creating a REPL programmatically. Use this method to initialize a history log file when working with REPL instances programmatically. +## `repl.builtinModules` + + +* {string[]} + +A list of the names of all Node.js modules, e.g., `'http'`. + ## `repl.start([options])`