Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dsherret/which-runtime

Deno module for checking which runtime the code is running in.
https://github.com/dsherret/which-runtime

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# which-runtime

[![documentation](https://doc.deno.land/badge.svg)](https://jsr.io/@david/which-runtime)

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

This may be useful in some extreme scenarios when using
[dnt](https://github.com/dsherret/dnt). Ideally do not use this and feature test
instead.

```ts
import { isDeno, isNode } from "jsr:@david/[email protected]";

if (isNode) {
// do something
}

if (isDeno) {
// do something
}
```