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