Skip to main content

Runtime

Helper functions relating to JavaScript runtimes.

Functions

getJavaScriptRuntime()

function getJavaScriptRuntime(): 
| undefined
| JavaScriptRuntime;

Defined in: functions/runtime.ts:14

Helper function to get the current JavaScript runtime, such as Node.js. Returns undefined if the current runtime cannot be detected.

Returns

| undefined | JavaScriptRuntime


isBunRuntime()

function isBunRuntime(): boolean;

Defined in: functions/runtime.ts:45

Helper function to check if the current JavaScript runtime is Bun.

Returns

boolean

See

https://bun.sh/


isDenoRuntime()

function isDenoRuntime(): boolean;

Defined in: functions/runtime.ts:54

Helper function to check if the current JavaScript runtime is Deno.

Returns

boolean

See

https://deno.com/


isNodeRuntime()

function isNodeRuntime(): boolean;

Defined in: functions/runtime.ts:63

Helper function to check if the current JavaScript runtime is Node.js.

Returns

boolean

See

https://nodejs.org/