📜  提示节点 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:49.042000             🧑  作者: Mango

代码示例1
var prompt = require('prompt');

  //
  // Start the prompt
  //
  prompt.start();

  //
  // Get two properties from the user: username and email
  //
  prompt.get(['username', 'email'], function (err, result) {
    //
    // Log the results.
    //
    console.log('Command-line input received:');
    console.log('  username: ' + result.username);
    console.log('  email: ' + result.email);
  });