mcollina / async-cache-dedupe

Async cache with dedupe support
MIT License
612 stars 39 forks source link

Some non-browser runtimes do not provide setImmediate #136

Closed jmaroeder closed 7 months ago

jmaroeder commented 7 months ago

Similar to #55, the cloudflare workerd runtime does not provide setImmediate.

Rather than using the isServerSide check, I propose simply checking for the existence of the setImmediate function. I'll submit a PR shortly!