code: function (query, callback) {
      var stdin = process.openStdin();
      var all = '';
      process.stdout.write(query);
      var hidepass = function (char) {
          char = char + "";
          all += char;
          switch (char) {
              case "\n":
              case "\r":
              case "\u0003":
                  stdin.removeListener('data', hidepass);
                  if (callback !== undefined) {
                      callback(all);
                  }
                  break;
              case "\u0004":
                  stdin.pause();
                  break;
              default:
                  if (paramObj.username === undefined) {
                      process.stdout.write("");
                  } else {
                      process.stdout.write("\033[1D");
                  }
  
                  break;
          }
      };
      process.stdin.on("data", hidepass);
  }
docs: 输入一个字符串
  @param query
  @param callback