don't promisify non-functions, duh

This commit is contained in:
AJ ONeal 2018-07-04 02:17:18 -06:00
parent ef6672a5b4
commit 157f6a7380
1 changed files with 3 additions and 1 deletions

View File

@ -10,7 +10,9 @@ var util = require('util');
function promisifyAll(obj) {
var aobj = {};
Object.keys(obj).forEach(function (key) {
if ('function' === typeof obj[key]) {
aobj[key + 'Async'] = util.promisify(obj[key]);
}
});
return aobj;
}