mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-01 13:53:11 +08:00
working
This commit is contained in:
13
local-cli/utils.js
Normal file
13
local-cli/utils.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Created by tdzl2003 on 2/13/16.
|
||||
*/
|
||||
|
||||
var read = require('read');
|
||||
|
||||
exports.question = function(query, password) {
|
||||
return new Promise((resolve, reject)=>read({
|
||||
prompt: query,
|
||||
silent: password,
|
||||
replace: password ? '*' : undefined,
|
||||
}, (err, result)=> err ? reject(err) : resolve(result)));
|
||||
}
|
||||
Reference in New Issue
Block a user