3 lines
117 B
JavaScript
3 lines
117 B
JavaScript
|
module.exports = (func) => new Promise((resolve, reject) =>
|
||
|
func((err, res) => err ? reject(err) : resolve(res))
|
||
|
);
|