diff options
Diffstat (limited to 'alarm/node_modules/agent-base/dist/src/promisify.js')
-rw-r--r-- | alarm/node_modules/agent-base/dist/src/promisify.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/alarm/node_modules/agent-base/dist/src/promisify.js b/alarm/node_modules/agent-base/dist/src/promisify.js new file mode 100644 index 0000000..b2f6132 --- /dev/null +++ b/alarm/node_modules/agent-base/dist/src/promisify.js @@ -0,0 +1,18 @@ +"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
\ No newline at end of file |