diff --git a/doc/api/repl.md b/doc/api/repl.md index a6d78b61d446b8..b25dd890f46781 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -153,10 +153,16 @@ and try to print `obj` in REPL, it will invoke the custom `inspect()` function: ``` ## Class: REPLServer + This inherits from [Readline Interface][] with the following events: ### Event: 'exit' + `function () {}` @@ -175,6 +181,9 @@ replServer.on('exit', () => { ### Event: 'reset' + `function (context) {}` @@ -197,6 +206,9 @@ replServer.on('reset', (context) => { ``` ### replServer.defineCommand(keyword, cmd) + * `keyword` {String} * `cmd` {Object|Function} @@ -235,6 +247,9 @@ Hello, Node.js User! ``` ### replServer.displayPrompt([preserveCursor]) + * `preserveCursor` {Boolean}