JSPM

  • Created
  • Published
  • Downloads 18285
  • Score
    100M100P100Q199146F
  • License Apache-2.0

Arcjet runtime detection

Package Exports

  • @arcjet/runtime
  • @arcjet/runtime/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@arcjet/runtime) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Arcjet Logo

@arcjet/runtime

npm badge

Arcjet runtime detection.

This package attempts to discover and provide runtime keys as defined by the WinterCG.

Installation

npm install -S @arcjet/runtime

Example

import { runtime, hasWebAssembly } from "@arcjet/runtime";

runtime() === "node"; // in Node.js
runtime() === "bun"; // in Bun.sh
runtime() === "edge-light"; // in Vercel Edge
runtime() === "workerd"; // in Cloudflare Workers

Implementation

Improvements of this library were informed by std-env, which is licensed MIT with licenses included in our source code.

License

Licensed under the Apache License, Version 2.0.