async-readline

1.1.0 • Public • Published

Async-readline

Async wrapper for readline

const async_readline = require('async-readline');
const rd = new async_readline({
    input: process.stdin,
    output: process.stdout,
    terminal: false
});

(async () => {
    let text;
    text = await rd.line();
    text = await rd.question("Tell me how much you love me");
})();

Methods

  • line --- returns promise which resolves next line from input
  • question --- prints its argument to output and then acts like line

Readme

Keywords

Package Sidebar

Install

npm i async-readline

Weekly Downloads

7

Version

1.1.0

License

ISC

Unpacked Size

20.3 kB

Total Files

10

Last publish

Collaborators

  • kotborealis