Skip to content
Myr

input

This file

Path

examples/input

24 lines · 509 bytes

Last changed by

Added `Command#choose()`Tj Holowaychukbefore adoptione7cdf10

History of this file

Take it

Initial commitTj Holowaychukbefore adoption672c7d0

lines 1–8
1#!/usr/bin/env node
23/**4 * Module dependencies.5 */67var program = require('../');8

Added `Command#choose()`Tj Holowaychukbefore adoptione7cdf10

line 9why, one step back
9program.prompt('Username: ', function(name){

Initial commitTj Holowaychukbefore adoption672c7d0

lines 10–11
10 console.log('hi %s', name);
11

Added `Command#choose()`Tj Holowaychukbefore adoptione7cdf10

line 12why, one step back
12 program.prompt('Description:', function(desc){

Initial commitTj Holowaychukbefore adoption672c7d0

lines 13–14
13 console.log('description was "%s"', desc.trim());
14

Added `Command#choose()`Tj Holowaychukbefore adoptione7cdf10

line 15why, one step back
15 program.prompt('Age: ', Number, function(age){

Initial commitTj Holowaychukbefore adoption672c7d0

lines 16–17
16 console.log('age: %j', age);
17

Added `Command#choose()`Tj Holowaychukbefore adoptione7cdf10

line 18why, one step back
18 program.prompt('Birthdate: ', Date, function(date){

Initial commitTj Holowaychukbefore adoption672c7d0

lines 19–24
19 console.log('date: %s', date);
20 process.stdin.destroy();21 });22 });23 });24});