source: node_modules/agent-base/dist/src/promisify.js@ 81bc7da

finki-main main
Last change on this file since 81bc7da was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 495 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3function promisify(fn) {
4 return function (req, opts) {
5 return new Promise((resolve, reject) => {
6 fn.call(this, req, opts, (err, rtn) => {
7 if (err) {
8 reject(err);
9 }
10 else {
11 resolve(rtn);
12 }
13 });
14 });
15 };
16}
17exports.default = promisify;
18//# sourceMappingURL=promisify.js.map
Note: See TracBrowser for help on using the repository browser.