Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5250b33

Browse filesBrowse files
vsemozhetbytItalo A. Casas
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 <benjamingr@gmail.com>
1 parent 807e99b commit 5250b33
Copy full SHA for 5250b33

File tree

Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/repl.md‎

Copy file name to clipboardExpand all lines: doc/api/repl.md
+9Lines changed: 9 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.