redis-smq-common
Version:
Provides essential components and utilities shared across RedisSMQ packages.
18 lines • 487 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.exec = exec;
function exec(operation, callback) {
try {
operation((err, result) => {
if (err) {
return callback(err);
}
return callback(null, result);
});
}
catch (error) {
const err = error instanceof Error ? error : new Error(String(error));
return callback(err);
}
}
//# sourceMappingURL=exec.js.map