Tizen 2.0 Release
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / node_modules / grunt / node_modules / prompt / examples / simple-prompt.js
1 /*
2  * simple-prompt.js: Simple example of using prompt.  
3  *
4  * (C) 2010, Nodejitsu Inc.
5  *
6  */
7  
8 var prompt = require('../lib/prompt');
9
10 //
11 // Start the prompt
12 //
13 prompt.start();
14
15 //
16 // Get two properties from the user: username and email
17 //
18 prompt.get(['username', 'email'], function (err, result) {
19   //
20   // Log the results.
21   //
22   console.log('Command-line input received:');
23   console.log('  username: ' + result.username);
24   console.log('  email: ' + result.email);
25 });