Add keyIn()
.
This commit is contained in:
parent
d724dbf5d2
commit
0c784f6533
2 changed files with 11 additions and 2 deletions
|
@ -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});
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "readline-sync",
|
||||
"version": "0.6.1",
|
||||
"version": "0.7.0",
|
||||
"title": "readlineSync",
|
||||
"description": "Synchronous Readline",
|
||||
"keywords": [
|
||||
|
|
Loading…
Reference in a new issue