Packages
@edge-runtime/primitives

Edge Runtime Primitives

The @edge-runtime/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 Edge Runtime APIs.

Installation

npm install @edge-runtime/primitives --save

This package includes built-in TypeScript support.

Usage

The @edge-runtime/primitives package exports a context containing all the web primitives:

import primitives from '@edge-runtime/primitives'
 
console.log(primitives)
 
// {
//   AbortController: [Getter],
//   AbortSignal: [Getter],
//   Blob: [Getter],
//   console: [Getter],
//   Crypto: [Getter],
//   CryptoKey: [Getter],
//   SubtleCrypto: [Getter],
//   crypto: [Getter],
//   TextDecoder: [Getter],
//   TextDecoderStream: [Getter],
//   …
// }