/which-runtime

Deno module for checking which runtime the code is running in.

Primary LanguageTypeScriptMIT LicenseMIT

which-runtime

documentation

Deno module for checking which runtime the code is running in.

This may be useful in some extreme scenarios when using dnt. Ideally do not use this and feature test instead.

import { isDeno, isNode } from "jsr:@david/which-runtime@0.2";

if (isNode) {
  // do something
}

if (isDeno) {
  // do something
}