This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Description
Ajv, the JSON-Schema validator doesn't work on Cloudflare Workers.. It relies on eval()
'd code generation, and CF workers don't allow eval().
I was surprised to find that it worked perfectly fine in Cloudworker. I think it's because ajv doesn't actually use eval()
, it uses the new Function(<string>)
constructor, which we patch into the runtime environment here.
For consistency, we should find a way to disable that mechanism without breaking the foo instanceof Function
construct.