redis-smq-common
Version:
Provides essential components and utilities shared across RedisSMQ packages.
15 lines • 396 B
JavaScript
export 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