1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
react-native-pushy/local-cli/utils.js
2016-02-14 00:04:42 +08:00

13 lines
310 B
JavaScript

/**
* 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)));
}