18 lines
No EOL
495 B
JavaScript
18 lines
No EOL
495 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
function promisify(fn) {
|
|
return function (req, opts) {
|
|
return new Promise((resolve, reject) => {
|
|
fn.call(this, req, opts, (err, rtn) => {
|
|
if (err) {
|
|
reject(err);
|
|
}
|
|
else {
|
|
resolve(rtn);
|
|
}
|
|
});
|
|
});
|
|
};
|
|
}
|
|
exports.default = promisify;
|
|
//# sourceMappingURL=promisify.js.map
|