Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/dsherret/which-runtime
- Owner: dsherret
- License: mit
- Created: 2021-10-29T15:11:38.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-19T21:14:38.000Z (10 months ago)
- Last Synced: 2024-04-14T07:15:01.980Z (8 months ago)
- Language: TypeScript
- Size: 1.95 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
}
```