Add keyIn().

This commit is contained in:
anseki 2015-03-01 23:46:52 +09:00
parent d724dbf5d2
commit 0c784f6533
2 changed files with 11 additions and 2 deletions

View file

@ -177,7 +177,7 @@ function _execSyncByFile(command, options) {
} }
// for dev // for dev
exports.useShellSet = function(use) { useShell = use; }; //exports.useShellSet = function(use) { useShell = use; };
exports.setPrint = function(fnc) { print = fnc; }; exports.setPrint = function(fnc) { print = fnc; };
@ -215,3 +215,12 @@ exports.question = function(query, options) {
/* jshint eqnull:false */ /* jshint eqnull:false */
options); options);
}; };
exports.keyIn = function(message) {
return _readlineSync(
/* jshint eqnull:true */
message != null ? message : '',
/* jshint eqnull:false */
{keyIn: true});
};

View file

@ -1,6 +1,6 @@
{ {
"name": "readline-sync", "name": "readline-sync",
"version": "0.6.1", "version": "0.7.0",
"title": "readlineSync", "title": "readlineSync",
"description": "Synchronous Readline", "description": "Synchronous Readline",
"keywords": [ "keywords": [