source: trip-planner-front/node_modules/agent-base/dist/src/promisify.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 495 bytes
RevLine 
[6a3a178]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.