UNPKG

redis-smq-common

Version:

Provides essential components and utilities shared across RedisSMQ packages.

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