UNPKG

durable-utils

Version:

Utilities for Cloudflare Durable Objects and Workers, including SQL migrations, sharding and retry utilities, and more.

13 lines (12 loc) 282 B
// src/do-utils.ts function stubByName(doNamespace, name, options) { const doId = doNamespace.idFromName(name); return doNamespace.get(doId, options); } function isErrorRetryable(err) { return err?.retryable && !err?.overloaded; } export { isErrorRetryable, stubByName };