Skip to content

Commit 5250b33

Browse files
vsemozhetbytitaloacasas
authored andcommitted
doc: document argument variant in the repl.md
`options` in the `repl.start([options])` can be a string. Ref: #10160 PR-URL: #10221 Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent 807e99b commit 5250b33

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/api/repl.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,15 @@ added: v0.1.91
418418

419419
The `repl.start()` method creates and starts a `repl.REPLServer` instance.
420420

421+
If `options` is a string, then it specifies the input prompt:
422+
423+
```js
424+
const repl = require('repl');
425+
426+
// a Unix style prompt
427+
repl.start('$ ');
428+
```
429+
421430
## The Node.js REPL
422431

423432
Node.js itself uses the `repl` module to provide its own interactive interface

0 commit comments

Comments
 (0)