co-prompt
Version:
simple terminal user input 'co'
44 lines (25 loc) • 684 B
Markdown
Sane terminal user-input for nodejs that return thunks for [co](https://github.com/visionmedia/co).
```
$ npm install co-fs
```
```js
var name = yield prompt('username: ');
var pass = yield password('password: ');
var desc = yield multiline('description: ');
var ok = yield confirm('are you sure? ');
```
Prompt for user input with `msg`.
Prompt for password input with `msg` and optional `mask`
defaulting to "*".
Prompt for multi-line input with `msg`.
Prompt for confirmation with `msg`.
MIT