Need help with co-prompt?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

tj
196 Stars 20 Forks 6 Commits 10 Opened issues

Description

sane terminal user-input for node.js using thunks / generators

Services available

!
?

Need anything else?

Contributors list

# 79
JavaScr...
Node.js
lambda
bdd
2 commits
# 204,011
CSS
Shell
HTML
1 commit
# 5,678
express...
gzip
graphql...
synchro...
1 commit

co-prompt

Sane terminal user-input for nodejs that return thunks for co.

Installation

$ npm install co-prompt

Examples

var name = yield prompt('username: ');
var pass = yield password('password: ');
var desc = yield multiline('description: ');
var ok = yield confirm('are you sure? ');

API

prompt(msg)

Prompt for user input with

msg
.

prompt.password(msg, [mask])

Prompt for password input with

msg
and optional
mask
defaulting to "*".

prompt.multiline(msg)

Prompt for multi-line input with

msg
.

prompt.confirm(msg)

Prompt for confirmation with

msg
.

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.