Runtime Edge Primitives
The @runtime-edge/primitives package contains all the Web Standard APIs that represent the Edge environment.
These APIs are a subset of modern browser APIs (such as fetch
, URLPattern
, structuredClone
, etc).
See full list is available at Runtime Edge APIs.
Installation
npm install @runtime-edge/primitives --save
This package includes built-in TypeScript support.
Usage
The @runtime-edge/primitives package exports a context containing all the web primitives:
import primitives from '@runtime-edge/primitives'
console.log(primitives)
// {
// AbortController: [Getter],
// AbortSignal: [Getter],
// Blob: [Getter],
// console: [Getter],
// Crypto: [Getter],
// CryptoKey: [Getter],
// SubtleCrypto: [Getter],
// crypto: [Getter],
// TextDecoder: [Getter],
// TextDecoderStream: [Getter],
// …
// }