File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -371,7 +371,7 @@ within the action function for commands registered using the
371371added: v0.1.91
372372-->
373373
374- * ` options ` {Object}
374+ * ` options ` {Object | String }
375375 * ` prompt ` {String} The input prompt to display. Defaults to ` > ` .
376376 * ` input ` {Readable} The Readable stream from which REPL input will be read.
377377 Defaults to ` process.stdin ` .
@@ -413,6 +413,15 @@ added: v0.1.91
413413
414414The ` repl.start() ` method creates and starts a ` repl.REPLServer ` instance.
415415
416+ If ` options ` is a string, then it specifies the input prompt:
417+
418+ ``` js
419+ const repl = require (' repl' );
420+
421+ // a Unix style prompt
422+ repl .start (' $ ' );
423+ ```
424+
416425## The Node.js REPL
417426
418427Node.js itself uses the ` repl ` module to provide its own interactive interface
You can’t perform that action at this time.
0 commit comments