diff --git a/doc/api/repl.md b/doc/api/repl.md index 670705dbf2aa75..8305b1d2c920ca 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -332,10 +332,20 @@ function myWriter(output) { added: v0.1.91 --> +* `options` {Object|string} See [`repl.start()`][] * Extends: {readline.Interface} -Instances of `repl.REPLServer` are created using the `repl.start()` method and -*should not* be created directly using the JavaScript `new` keyword. +Instances of `repl.REPLServer` are created using the [`repl.start()`][] method +or directly using the JavaScript `new` keyword. + +```js +const repl = require('repl'); + +const options = { useColors: true }; + +const firstInstance = repl.start(options); +const secondInstance = new repl.REPLServer(options); +``` ### Event: `'exit'`