UNPKG

redis-smq-common

Version:

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

12 lines 422 B
import { CallbackEmptyReplyError } from '../errors/index.js'; export function withCallback(setup, operation, callback) { setup((err, resource) => { if (err) return callback(err); if (resource === null || resource === undefined) { return callback(new CallbackEmptyReplyError()); } operation(resource, callback); }); } //# sourceMappingURL=with-callback.js.map