Skip to main content
Home
Works with
This package works with Browsers, Deno, Node.js
This package works with Node.js
This package works with Deno
This package works with Browsers
JSR Score100%
Published2 years ago (0.1.3)

Detect which runtime you are running in

default

Functions

f
detect(): "browser" | "node" | "deno" | null

A function that detects which runtime the code is running on.

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@luca/runtime-detector

Import symbol

import { detect } from "@luca/runtime-detector";
or

Import directly with a jsr specifier

import { detect } from "jsr:@luca/runtime-detector";