From 5250b3358e7036ca7be84782007106d0b582ea99 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sun, 11 Dec 2016 01:22:04 +0200 Subject: [PATCH] doc: document argument variant in the repl.md `options` in the `repl.start([options])` can be a string. Ref: https://github.com/nodejs/node/pull/10160 PR-URL: https://github.com/nodejs/node/pull/10221 Reviewed-By: Benjamin Gruenbaum --- doc/api/repl.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/api/repl.md b/doc/api/repl.md index eb32f2c2b2755b..1b03ba47a25d99 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -418,6 +418,15 @@ added: v0.1.91 The `repl.start()` method creates and starts a `repl.REPLServer` instance. +If `options` is a string, then it specifies the input prompt: + +```js +const repl = require('repl'); + +// a Unix style prompt +repl.start('$ '); +``` + ## The Node.js REPL Node.js itself uses the `repl` module to provide its own interactive interface