rsshub / lib /utils /is-worker.ts
asemxin
Initial commit for HF Spaces
bf48b89
// Runtime detection of Cloudflare Workers environment
// Workers have specific global objects like caches and WebSocketPair
export const isWorker = globalThis.caches !== undefined && (globalThis as unknown as Record<string, unknown>).WebSocketPair !== undefined;