Skip to content
forked from tj/co-prompt

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

Notifications You must be signed in to change notification settings

Concatapult/co-prompt

This branch is 1 commit ahead of tj/co-prompt:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Rui Marinho
Nov 23, 2014
82bd7dd · Nov 23, 2014

History

7 Commits
Nov 23, 2014
Jul 19, 2013
Jul 19, 2013
Jul 19, 2013
Jul 19, 2013
Nov 23, 2014

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.0%
  • Makefile 6.0%