rhettlunn / is-odd-ai

Why check if something is odd simply, when you can do it with ✨AI✨
Apache License 2.0
327 stars 9 forks source link

Cloudflare workers #2

Open stefanofa opened 2 weeks ago

stefanofa commented 2 weeks ago

Is this library compatible with cloudflare workers?

rhettlunn commented 2 weeks ago

Thanks for your question, @stefanofa! Currently, is-odd-ai isn't compatible with Cloudflare Workers, but we'd welcome a contribution to add support. Here's a breakdown of the current incompatibilities and a roadmap for adding Cloudflare Workers support while maintaining compatibility with existing environments:

Current incompatibilities:

  1. Environment variables: We use dotenv, not supported in Cloudflare Workers.
  2. Node.js dependencies: We use axios, unavailable in the Cloudflare Workers runtime.
  3. Module system: Cloudflare Workers use ES modules, while we currently use CommonJS.

Roadmap for Cloudflare Workers compatibility:

Key considerations:

If you're up for tackling this, feel free to submit a pull request with your implementation. We're excited to see how you approach adding Cloudflare Workers support while maintaining compatibility with our existing environments!

Let us know if you have any questions or need any clarifications as you work on this feature. Good luck, and thanks for considering contributing to is-odd-ai! 🚀