input
This file
Path
examples/input
24 lines · 515 bytes
Last changed by
Fixed: line-buffered input automatically trimmed. Closes #31Tj Holowaychukbefore adoption9745551
History of this fileTake it
1#!/usr/bin/env node23/**4 * Module dependencies.5 */67var program = require('../');8Added `Command#choose()`Tj Holowaychukbefore adoptione7cdf10
line 9why, one step back9program.prompt('Username: ', function(name){Fixed: line-buffered input automatically trimmed. Closes #31Tj Holowaychukbefore adoption9745551
line 10why, one step back10 console.log('hi %s\n', name);11Added `Command#choose()`Tj Holowaychukbefore adoptione7cdf10
line 12why, one step back12 program.prompt('Description:', function(desc){Initial commitTj Holowaychukbefore adoption672c7d0
lines 13–1413 console.log('description was "%s"', desc.trim());14Added `Command#choose()`Tj Holowaychukbefore adoptione7cdf10
line 15why, one step back15 program.prompt('Age: ', Number, function(age){Fixed: line-buffered input automatically trimmed. Closes #31Tj Holowaychukbefore adoption9745551
line 16why, one step back16 console.log('age: %j\n', age);17Added `Command#choose()`Tj Holowaychukbefore adoptione7cdf10
line 18why, one step back18 program.prompt('Birthdate: ', Date, function(date){Fixed: line-buffered input automatically trimmed. Closes #31Tj Holowaychukbefore adoption9745551
line 19why, one step back19 console.log('date: %s\n', date);Initial commitTj Holowaychukbefore adoption672c7d0
lines 20–2420 process.stdin.destroy();21 });22 });23 });24});