JavaScript Standards
Native JavaScript APIs are available for use, such as Math and JSON objects.
How it works
The Azion runtime is built on web standards, so the JavaScript you write in a function relies on the same language features and global objects you already know from the browser and modern server environments. Standard built-ins like Math, JSON, Date, String, Array, Map, Set, and the Promise-based async model are all available, which means most portable JavaScript runs without modification. On top of the language itself, the runtime exposes widely adopted Web APIs such as fetch, Request, Response, the Web Crypto interfaces, streams, and event handling, letting you build logic with familiar tools instead of proprietary ones. Relying on these standards keeps your code interoperable, easier to test locally, and simpler to port across platforms, while still executing close to your end users on Azion’s global network.
You will find more details about the JavaScript reference in this link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
eval, new Function are blocked for security reasons.
For security reasons, dynamic code evaluation through eval and the Function constructor is disabled, so functions cannot generate and run arbitrary code at runtime.
Use cases
- Parsing and serializing payloads with the
JSONobject as requests flow through a function. - Performing calculations, formatting, and data manipulation using standard
Math,Date, andStringmethods. - Writing portable logic that behaves consistently between local development and the Azion runtime.
- Combining native language features with supported Web APIs to assemble responses entirely on Azion’s global network.