mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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 <benjamingr@gmail.com>
This commit is contained in:
1 parent
807e99b81d
commit
5250b3358e
1 file changed
+9
@@ -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
|
||||
|
||||
Reference in new issue
Block a user