lib/utils.js
function (message, config, cb) {
        if(typeof config === 'function') {
            cb = config;
            config = {};
        }
        var stdin = config.stdin || process.stdin,
            stdout = config.stdout || process.stdout,
            prompt = config.prompt || '\u203A';
        stdout.write('  ' + message + '\n  ' + prompt + ' ');
        stdin.resume();
        stdin.setEncoding('utf8');
        stdin.on('data', function (text) {
            text = text.trim().replace(/\r\n|\n/, '');
            cb(text);
        });
    }
function (message, config, cb) {
        if(typeof config === 'function') {
            cb = config;
            config = {};
        }
        var stdin = config.stdin || process.stdin,
            stdout = config.stdout || process.stdout,
            prompt = config.prompt || '\u203A';
        stdout.write('  ' + message + '\n  ' + prompt + ' ');
        stdin.resume();
        stdin.setEncoding('utf8');
        stdin.on('data', function (text) {
            text = text.trim().replace(/\r\n|\n/, '');
            cb(text);
        });
    }
function ( message , config , cb ) { if ( typeof config === 'function' ) { cb = config ; config = { } ; } var stdin = config . stdin || process . stdin , stdout = config . stdout || process . stdout , prompt = config . prompt || '\u203A' ; stdout . write ( '  ' + message + '\n  ' + prompt + ' ' ) ; stdin . resume ( ) ; stdin . setEncoding ( 'utf8' ) ; stdin . on ( 'data' , function ( text ) { text = text . trim ( ) . replace ( / \r\n|\n / , '' ) ; cb ( text ) ; } ) ; }
creates a console prompt and calls the passed callback with the anwser
creates a console prompt and calls the passed callback with the anwser