UNPKG

redis-smq-common

Version:

RedisSMQ Common Library provides many components that are mainly used by RedisSMQ and RedisSMQ Monitor.

15 lines 528 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withCallback = withCallback; const index_js_1 = require("../errors/index.js"); function withCallback(setup, operation, callback) { setup((err, resource) => { if (err) return callback(err); if (resource === null || resource === undefined) { return callback(new index_js_1.CallbackEmptyReplyError()); } operation(resource, callback); }); } //# sourceMappingURL=with-callback.js.map