File tree 1 file changed +10
-1
lines changed 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
371
371
added: v0.1.91
372
372
-->
373
373
374
- * ` options ` {Object}
374
+ * ` options ` {Object | String }
375
375
* ` prompt ` {String} The input prompt to display. Defaults to ` > ` .
376
376
* ` input ` {Readable} The Readable stream from which REPL input will be read.
377
377
Defaults to ` process.stdin ` .
@@ -413,6 +413,15 @@ added: v0.1.91
413
413
414
414
The ` repl.start() ` method creates and starts a ` repl.REPLServer ` instance.
415
415
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
+
416
425
## The Node.js REPL
417
426
418
427
Node.js itself uses the ` repl ` module to provide its own interactive interface
You can’t perform that action at this time.
0 commit comments