don't promisify non-functions, duh
This commit is contained in:
parent
ef6672a5b4
commit
157f6a7380
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue