Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

repl-x

qianbin26ISC0.2.0TypeScript support: included

Promise friendly REPL

repl, promise

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.