@arcjet/runtime
Advanced tools
+9
-0
@@ -0,2 +1,11 @@ | ||
| /** | ||
| * Runtime environment that can be detected. | ||
| */ | ||
| export type Runtime = "workerd" | "deno" | "node" | "bun" | "edge-light" | ""; | ||
| /** | ||
| * Detect the current runtime environment at runtime. | ||
| * | ||
| * @returns | ||
| * Runtime. | ||
| */ | ||
| export declare function runtime(): Runtime; |
+6
-0
@@ -25,2 +25,8 @@ // This code was improved by detection mechanisms in | ||
| // SOFTWARE. | ||
| /** | ||
| * Detect the current runtime environment at runtime. | ||
| * | ||
| * @returns | ||
| * Runtime. | ||
| */ | ||
| function runtime() { | ||
@@ -27,0 +33,0 @@ // The detection order matters in this function because some platforms will |
+5
-6
| { | ||
| "name": "@arcjet/runtime", | ||
| "version": "1.0.0-beta.10", | ||
| "version": "1.0.0-beta.11", | ||
| "description": "Arcjet runtime detection", | ||
@@ -54,7 +54,6 @@ "keywords": [ | ||
| "devDependencies": { | ||
| "@arcjet/eslint-config": "1.0.0-beta.10", | ||
| "@arcjet/rollup-config": "1.0.0-beta.10", | ||
| "@arcjet/tsconfig": "1.0.0-beta.10", | ||
| "@rollup/wasm-node": "4.46.2", | ||
| "eslint": "9.32.0", | ||
| "@arcjet/eslint-config": "1.0.0-beta.11", | ||
| "@arcjet/rollup-config": "1.0.0-beta.11", | ||
| "@rollup/wasm-node": "4.50.0", | ||
| "eslint": "9.34.0", | ||
| "typescript": "5.9.2" | ||
@@ -61,0 +60,0 @@ }, |
+6
-1
@@ -62,2 +62,6 @@ <a href="https://arcjet.com" target="_arcjet-home"> | ||
| Derivative work based on [`std-env`][std-env] licensed under | ||
| [MIT][std-env-license] © Pooya Parsa. | ||
| Our work cherry picks only what we need. | ||
| [apache-license]: http://www.apache.org/licenses/LICENSE-2.0 | ||
@@ -67,2 +71,3 @@ [arcjet]: https://arcjet.com | ||
| [wintercg]: https://wintercg.org/ | ||
| [std-env]: https://github.com/unjs/std-env | ||
| [std-env-license]: https://github.com/unjs/std-env/blob/7e8cb7b/LICENCE | ||
| [std-env]: https://github.com/unjs/std-env/blob/d57a5d8/src/runtimes.ts |
20108
2.22%5
-16.67%117
14.71%72
7.46%