1.1.0 • Published 6 years ago

async-readline v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

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
1.1.0

6 years ago

1.0.0

6 years ago