有没有一个模块获取用户input从node.js命令行?

首先:我不是指从process.argv数组中parsing参数和选项,而是提示用户并处理input/输出。 我已经浏览了Node.js官方模块列表,没有发现任何提及input的部分或小节。 实际上,在该页面上search“input”只会得到1个与YAML有关的结果。

无论如何,我想cli的input应该是asynchronous的,我已经解决了这个问题之前使用stdin.on('data')是凌乱的至less说。 这似乎是一个节点模块,可以带来额外的好东西,如进度条,旋转器,彩色输出,inputvalidation等完美的任务。

这里可能有一些模块,但我找不到任何一个。

帮帮我!!

(为了澄清,我需要的唯一function是简化处理用户input)

在这里search模块: http : //eirikb.github.com/nipster/

  • 提示: https : //github.com/jesusabdullah/node-prompt
  • 进度条: https : //github.com/substack/node-multimeter
  • 颜色: https : //github.com/Marak/colors.js
  • inputvalidation: https : //github.com/chriso/node-validator
  • 更多inputvalidation(webbish tho): https : //github.com/caolan/forms

另外,如果你想写你自己的: http : //nodejs.org/docs/latest/api/all.html#readline

#node.js IRC欢迎你: http : #node.js