Package Exports
- readline-async
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (readline-async) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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);