Skip to content
Myr

docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 1c281c6 · Browse files · 1 file+10 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−0 removed

  • other:+10 added−0 removed

1 file+10 added−0 removed

modified:lib/commander.js+10 added
720 unmodified lines
721722/**723 * Choice prompt with `list` of items and callback `fn(index, item)`724 *725 * Examples:726 *727 * var list = ['tobi', 'loki', 'jane', 'manny', 'luna'];728 * 729 * console.log('Choose the coolest pet:');730 * program.choose(list, function(i){731 * console.log('you chose %d "%s"', i, list[i]);732 * process.stdin.destroy();733 * });734 *735 * @param {Array} list736 * @param {Function} fn737 * @api public738 */
47 unmodified lines