readline-async

0.1.0 • Public • Published

readline-async

Very simple bluebird promise version of node's readline.

Error handling is incomplete, this is mostly for illustrative purposes.

See fpsokobanjs for an example how it is used.

console.log("Starting, please enter something");
 
readlineAsync()
.then( line => {
        console.log("You said " + line);
        return readlineAsync();
})
.then( line => {
        console.log("and this " + line);
        return "done";
})
.then(console.log);

Package Sidebar

Install

npm i readline-async

Weekly Downloads

10

Version

0.1.0

License

ISC

Last publish

Collaborators

  • rednifre