repl-x
v0.2.0
Published
Promise friendly REPL
Downloads
427
Readme
REPL-X
Promise friendly REPL
Installation
npm i repl-x
Usage
To start an REPL server, it's exactly the same as repl
module in node.js.
import * as REPLX from 'repl-x'
const server = REPLX.start(/* options */)
Now you can happily play with promise
> (async () => 'hello world')()
Promise { 'hello world' }
>
> @ (async () => 'hello world')()
'hello world'
>
Here the leading @
symbol will tell the server to await the result of following expression.