Arcjet runtime detection.
This package attempts to discover and provide runtime keys as defined by the WinterCG.
npm install -S @arcjet/runtime
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
Improvements of this library were informed by std-env, which is licensed MIT with licenses included in our source code.
Licensed under the Apache License, Version 2.0.