diff --git a/lib/readline-sync.js b/lib/readline-sync.js index 64b0858..edb7e77 100644 --- a/lib/readline-sync.js +++ b/lib/readline-sync.js @@ -177,7 +177,7 @@ function _execSyncByFile(command, options) { } // for dev -exports.useShellSet = function(use) { useShell = use; }; +//exports.useShellSet = function(use) { useShell = use; }; exports.setPrint = function(fnc) { print = fnc; }; @@ -215,3 +215,12 @@ exports.question = function(query, options) { /* jshint eqnull:false */ options); }; + +exports.keyIn = function(message) { + return _readlineSync( +/* jshint eqnull:true */ + message != null ? message : '', +/* jshint eqnull:false */ + {keyIn: true}); +}; + diff --git a/package.json b/package.json index 4e6d5df..ebd55f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "readline-sync", - "version": "0.6.1", + "version": "0.7.0", "title": "readlineSync", "description": "Synchronous Readline", "keywords": [